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.

A029898 Pitoun's sequence: a(n+1) is digital root of a(0) + ... + a(n).

This page as a plain text file.
%I A029898 #51 Dec 14 2023 05:43:50
%S A029898 1,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,
%T A029898 8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,
%U A029898 2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2,4,8,7,5,1,2
%N A029898 Pitoun's sequence: a(n+1) is digital root of a(0) + ... + a(n).
%C A029898 If the initial 1 is omitted, this is 2^n mod 9. - _N. J. A. Sloane_
%C A029898 From _Cino Hilliard_, Dec 31 2004: (Start)
%C A029898 Except for the initial term, also the digital root of 11^n.
%C A029898 Except for the initial term, also the decimal expansion of 125/1001.
%C A029898 Except for the initial term, also the digital root of 2^n. (End)
%C A029898 Aside from the first term, periodic with period 6. - _Charles R Greathouse IV_, Nov 29 2011
%H A029898 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,-1,1).
%F A029898 a(n) = digital root of 2^(n-1) in base 10 = 2^(n-1) (mod 9). - _Olivier Gérard_, Jun 06 2001
%F A029898 For n > 0: a(n+6) = a(n) and a(n) = A007612(n+1) - A007612(n) = A010888(A007612(n)). - _Reinhard Zumkeller_, Feb 27 2006
%F A029898 a(n) = (9 + cos(n*Pi) - 4*sqrt(3)*sin(n*Pi/3))/2 for n > 0 with a(0)=1. - _Wesley Ivan Hurt_, Oct 04 2018
%F A029898 From _Stefano Spezia_, Jun 27 2022: (Start)
%F A029898 O.g.f.: (1 + x^2 + 3*x^3 + 4*x^4)/((1 - x)*(1 + x)*(1 - x + x^2)).
%F A029898 E.g.f.: 5*cosh(x) - 2*sqrt(3)*exp(x/2)*sin(sqrt(3)*x/2) + 4*(sinh(x) - 1). (End)
%e A029898 1 + 1 + 2 + 4 + 8 + 7 + 5 = 28 -> 2 + 8 = 10 -> a(7) = 1.
%t A029898 a[n_] := PowerMod[2, n-1, 9]; a[0] = 1; Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Nov 29 2011 *)
%t A029898 Join[{1},LinearRecurrence[{1,0,-1,1},{1,2,4,8},110]] (* or *) Join[{1}, PowerMod[2,Range[110],9]] (* _Harvey P. Dale_, Nov 24 2014 *)
%o A029898 (Sage) [power_mod(2,n,9)for n in range(0, 105)] # _Zerinvary Lajos_, Nov 03 2009
%o A029898 (PARI) a(n)=if(n,[5,1,2,4,8,7][n%6+1],1) \\ _Charles R Greathouse IV_, Nov 29 2011
%Y A029898 Cf. A007612, A010888.
%K A029898 base,nonn,nice,easy
%O A029898 0,3
%A A029898 Amela2(AT)aol.com
%E A029898 More terms from _Cino Hilliard_, Dec 31 2004