A054978 Obtained from sequence of lucky numbers (A000959) by taking iterated absolute value differences of terms and extracting the leading diagonal.
1, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 2
Offset: 0
References
- Henry Gould, Gilbreath-Proth type sequence generated from Lucky numbers, unpublished.
Links
- Paolo Xausa, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Reinhard Zumkeller)
- Index entries for sequences related to Gilbreath conjecture and transform
Programs
-
Haskell
a054978 n = a054978_list !! n a054978_list = map head $ iterate (\lds -> map abs $ zipWith (-) (tail lds) lds) a000959_list -- Reinhard Zumkeller, Feb 10 2015
-
Mathematica
nmax = 104; (* index of last term *) imax = 400; (* max index of initial lucky array L *) L = Table[2 i + 1, {i, 0, imax}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; T[n_, n_] := If[n + 1 <= Length[L], L[[n + 1]], Print["imax should be increased"]; 0]; T[n_, k_] := T[n, k] = Abs[T[n, k + 1] - T[n - 1, k]]; a[n_] := T[n, 0]; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Sep 22 2021 *) A000959[upto_]:=Module[{s=2,a=Range[1,upto,2]},While[s
A054978[upto_]:=Module[{d=A000959[upto]},Join[{1},Table[First[d=Abs[Differences[d]]],Length[d]-1]]]; A054978[1000] (* Uses lucky numbers up to 1000 *) (* Paolo Xausa, May 11 2023 *)
Formula
a(n) = A254967(n,0). - Reinhard Zumkeller, Feb 11 2015
Extensions
More terms from Naohiro Nomoto, Jun 16 2001
Comments