cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A054978 Obtained from sequence of lucky numbers (A000959) by taking iterated absolute value differences of terms and extracting the leading diagonal.

This page as a plain text file.
%I A054978 #33 Sep 25 2023 19:19:51
%S A054978 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,
%T A054978 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,
%U A054978 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
%N A054978 Obtained from sequence of lucky numbers (A000959) by taking iterated absolute value differences of terms and extracting the leading diagonal.
%C A054978 The classical Gilbreath-Proth Conjecture is that when iterated absolute differences are formed from the sequence of primes, the leading diagonal is 2,1,1,1,1,1,1,1,1,... (see A036262). This is an analog for the lucky numbers sequence.
%C A054978 This is the Gilbreath transform of the lucky numbers (cf. A362451). It appears that apart from the initial term, all the other terms are 0 or 2 (compare A362460). - _N. J. A. Sloane_, May 07 2023
%D A054978 Henry Gould, Gilbreath-Proth type sequence generated from Lucky numbers, unpublished.
%H A054978 Paolo Xausa, <a href="/A054978/b054978.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Reinhard Zumkeller)
%H A054978 <a href="/index/Ge#Gilbreath">Index entries for sequences related to Gilbreath conjecture and transform</a>
%F A054978 a(n) = A254967(n,0). - _Reinhard Zumkeller_, Feb 11 2015
%t A054978 nmax = 104; (* index of last term *)
%t A054978 imax = 400; (* max index of initial lucky array L *)
%t A054978 L = Table[2 i + 1, {i, 0, imax}];
%t A054978 For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]];
%t A054978 T[n_, n_] := If[n + 1 <= Length[L], L[[n + 1]], Print["imax should be increased"]; 0];
%t A054978 T[n_, k_] := T[n, k] = Abs[T[n, k + 1] - T[n - 1, k]];
%t A054978 a[n_] := T[n, 0];
%t A054978 Table[a[n], {n, 0, nmax}] (* _Jean-François Alcover_, Sep 22 2021 *)
%t A054978 A000959[upto_]:=Module[{s=2,a=Range[1,upto,2]},While[s<Length[a]&&a[[s]]<=Length[a],a=Drop[a,{a[[s]],-1,a[[s++]]}]];a];
%t A054978 A054978[upto_]:=Module[{d=A000959[upto]},Join[{1},Table[First[d=Abs[Differences[d]]],Length[d]-1]]];
%t A054978 A054978[1000] (* Uses lucky numbers up to 1000 *) (* _Paolo Xausa_, May 11 2023 *)
%o A054978 (Haskell)
%o A054978 a054978 n = a054978_list !! n
%o A054978 a054978_list = map head $ iterate
%o A054978                (\lds -> map abs $ zipWith (-) (tail lds) lds) a000959_list
%o A054978 -- _Reinhard Zumkeller_, Feb 10 2015
%Y A054978 Cf. A000959, A036262, A054977.
%Y A054978 Cf. also A254967, A362451, A362460, A362461, A362462.
%K A054978 nonn,easy,nice
%O A054978 0,2
%A A054978 _Henry Gould_, May 29 2000
%E A054978 More terms from _Naohiro Nomoto_, Jun 16 2001