OFFSET
1,3
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The first 10 terms are:
n a(n) A317208(a(n))
-- ---- -------------
1 0 0
2 1 1
3 2 2
4 5 22
5 7 212
6 10 2112
7 13 222
8 15 21112
9 23 211112
10 28 21212
MATHEMATICA
z[n_] := Floor[(n + 1)*GoldenRatio] - n - 1; h[n_] := z[n] - z[n - 1]; w[n_] := Module[{m = n, zm = 0, hm, s = {}}, While[zm != 1, hm = h[m]; AppendTo[s, hm]; If[hm == 1, zm = z[m], zm = z[z[m]]]; m = zm]; s]; w[0] = {0}; Select[Range[0, 1000], PalindromeQ[w[#]] &]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jul 01 2023
STATUS
approved