Wikipedia:Reference desk/Archives/Mathematics/2020 October 8

= October 8 =

Which formula is correct??
For the centered hexagonal numbers 1, 7, 19, 37, 61, 91... I always thought that $$ 3n^2 - 3n + 1 $$ was the formula. Wikipedia's centered hexagonal number article agrees with me, but Mathworld and the OEIS say that it's $$ 3n^2 + 3n + 1 $$. Who is right?? Georgia guy (talk) 14:46, 8 October 2020 (UTC)


 * They both are. These are the same sequences, just offset by 1 ($$a_1 = 1$$ vs $$a_0 = 1$$), so it's just a matter of convention where you start indexing – kind of like how you can find the Fibonacci sequence indexed from 0 or 1. –Deacon Vorbis (carbon &bull; videos) 15:11, 8 October 2020 (UTC)


 * All are correct, but same are more correct than others. The Fibonacci numbers satisfy the beautiful divisibility property that
 * $$\gcd(F_m,F_n) = F_{\gcd(m,n)},$$
 * but only if the indexing is such that $$F_0 = 0.$$ I do not know of a strong argument, though, that favours one of the two reasonable indexing choices for the centred hexagonal numbers. --Lambiam 22:53, 8 October 2020 (UTC)
 * I also like $$F_{12}=12^2$$ pm a 23:37, 13 October 2020 (UTC)