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.

Previous Showing 11-19 of 19 results.

A227896 32-beat repeating palindromic sequence: digital roots of Fibonacci numbers indexed by the set of natural numbers not divisible by 2, 3 or 5 (A007775).

Original entry on oeis.org

1, 4, 8, 8, 4, 5, 1, 5, 4, 8, 4, 5, 1, 1, 5, 8, 8, 5, 1, 1, 5, 4, 8, 4, 5, 1, 5, 4, 8, 8, 4, 1, 1, 4, 8, 8, 4, 5, 1, 5, 4, 8, 4, 5, 1, 1, 5, 8, 8, 5, 1, 1, 5, 4, 8, 4, 5, 1, 5, 4, 8, 8, 4, 1, 1, 4, 8, 8, 4, 5, 1, 5, 4, 8, 4, 5, 1, 1, 5, 8, 8, 5, 1, 1, 5, 4, 8, 4, 5, 1, 5, 4, 8, 8, 4, 1, 1, 4, 8, 8, 4, 5, 1, 5, 4, 8, 4, 5, 1, 1, 5, 8, 8, 5, 1, 1, 5, 4, 8, 4, 5, 1, 5, 4, 8, 8, 4, 1
Offset: 1

Views

Author

Gary Croft, Oct 14 2013

Keywords

Crossrefs

Programs

  • PARI
    a(n)=fibonacci(n\8*6 + 9 + 3*(n+1)\2*2 - max(5, (n-2)%8)*2)%9 \\ Charles R Greathouse IV, Aug 26 2014
    
  • PARI
    a(n)=[1,4,8,8,4,5,1,5,4,8,4,5,1,1,5,8,8,5,1,1,5,4,8,4,5,1,5,4,8,8,4,1][n%32+1] \\ Charles R Greathouse IV, Aug 26 2014
    
  • PARI
    Vec(x*(1 + 3*x + 4*x^2 - 4*x^4 + x^5 - 4*x^6 + 4*x^7 - x^8 + 4*x^9 - 4*x^10 + x^11 - 4*x^12 + 4*x^14 + 3*x^15 + x^16) / ((1 - x)*(1 + x^16)) + O(x^100)) \\ Colin Barker, Sep 21 2019

Formula

From Colin Barker, Sep 21 2019: (Start)
G.f.: x*(1 + 3*x + 4*x^2 - 4*x^4 + x^5 - 4*x^6 + 4*x^7 - x^8 + 4*x^9 - 4*x^10 + x^11 - 4*x^12 + 4*x^14 + 3*x^15 + x^16) / ((1 - x)*(1 + x^16)).
a(n) = a(n-1) - a(n-16) + a(n-17) for n>17.
(End)

A065124 a(n) = (sum of digits of a(n-2)) + a(n-1); a(0) = 0 and a(1) = 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 21, 25, 28, 35, 45, 53, 62, 70, 78, 85, 100, 113, 114, 119, 125, 136, 144, 154, 163, 173, 183, 194, 206, 220, 228, 232, 244, 251, 261, 269, 278, 295, 312, 328, 334, 347, 357, 371, 386, 397, 414, 433, 442, 452, 462, 473, 485, 499, 516
Offset: 0

Views

Author

Robert G. Wilson v, Nov 13 2001

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = Apply[ Plus, IntegerDigits[ a[n - 2] ]] + a[n - 1]; Table[ a[n], {n, 0, 100} ]
  • PARI
    { for (n=0, 1000, if (n>1, a=sumdigits(a2) + a1; a2=a1; a1=a, if (n, a=a1=1, a=a2=0)); write("b065124.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 10 2009

Formula

A010888(a(n)) = A030132(n). - Davide Rotondo, Dec 02 2024

A210456 Period of the sequence of the digital roots of Fibonacci n-step numbers.

Original entry on oeis.org

1, 24, 39, 78, 312, 2184, 1092, 240, 273, 26232, 11553, 9840, 177144, 14348904, 21523359, 10315734, 48417720, 16120104, 15706236, 5036466318, 258149112, 1162261464, 141214768239, 421900912158, 8857200, 2184, 2271, 28578504864, 21938847432216, 148698308091840
Offset: 1

Views

Author

Keywords

Comments

More precisely, start with 0,0,...,0,1 (with n-1 0's and a single 1); thereafter the next term is the digital root (A010888) of the sum of the previous n terms. This is a periodic sequence and a(n) is the length of the period.
Theorem: a(n) <= 9^n.
Conjecture: All entries >1 are divisible by 3.
Additional terms are a(242)=177144, a(243)=177879.
More: a(728)=1594320, a(729)=1596513, a(2186)=14348904, a(2187)=14355471, a(6560)=129140160, a(6561)=129159849, a(19682)=1162261464, a(19683)=1162320519. - Hans Havermann, Jan 30 2013, Feb 08 2013
The modulus-9 Pisano periods of Fibonacci numbers, k-th order sequences. - Hans Havermann, Feb 10 2013
Conjecture: a(3^n-1)=3^(2*n+1)-3, a(3^n)=3^(2*n+1)+3^(n+1)+3 - Fred W. Helenius (fredh(AT)ix.netcom.com), posting to MathFun, Feb 21 2013

Examples

			Digital roots of Fibonacci numbers (A030132) are 0, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9, 1, 1, 2, 3,... Thus the period is 24 (1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9).
		

Crossrefs

Cf. Fibonacci numbers, k-th order sequences, A000045 (Fibonacci numbers, k=2), A030132 (digital root, k=2), A001175 (Pisano periods, k=2), A000073 (tribonacci numbers, k=3), A222407 (digital roots, k=3), A046738 (Pisano periods, k=3), A029898 (Pitoun's sequence), A187772, A220555.
Cf. also A010888.

Programs

  • Maple
    A210456:=proc(q,i)
    local d,k,n,v;
    v:=array(1..q);
    for d from 1 to i do
      for n from 1 to d do v[n]:=0; od; v[d+1]:=1;
      for n from d+2 to q do v[n]:=1+((add(v[k],k=n-d-1..n-1)-1) mod 9);
        if add(v[k],k=n-d+1..n)=9*d and v[n-d]=1 then print(n-d); break;
    fi; od; od; end:
    A210456 (100000000,100);
  • Mathematica
    f[n_] := f[n] = Block[{s = PadLeft[{1}, n], c = 1}, s = t = Nest[g, s, n]; While[t = g[t]; s != t, c++]; c]; g[lst_List] := Rest@Append[lst, 1 + Mod[-1 + Plus @@ lst, 9]]; Do[ Print[{n, f[n] // Timing}], {n, 100}]

Extensions

a(23) from Hans Havermann, Jan 30 2013
a(24) from Hans Havermann, Feb 18 2013
a(28) from Robert G. Wilson v, Feb 21 2013
a(29)-a(30) from Hiroaki Yamanouchi, May 04 2015

A112677 Sum of digits of the sum of the previous 4 terms.

Original entry on oeis.org

1, 1, 1, 1, 4, 7, 4, 7, 4, 4, 10, 7, 7, 10, 7, 4, 10, 4, 7, 7, 10, 10, 7, 7, 7, 4, 7, 7, 7, 7, 10, 4, 10, 4, 10, 10, 7, 4, 4, 7, 4, 10, 7, 10, 4, 4, 7, 7, 4, 4, 4, 10, 4, 4, 4, 4, 7, 10, 7, 10, 7, 7, 4, 10, 10, 4, 10, 7, 4, 7, 10, 10, 4, 4, 10, 10, 10, 7, 10, 10, 10, 10
Offset: 0

Views

Author

Jonathan Vos Post, Dec 30 2005

Keywords

Comments

This is to the tetranacci sequence as A112661 is to the tribonacci and as A030132 is to Fibonacci. A000288 is the tetranacci sequence (A000078) but starting with values (1,1,1,1). Andrew Carmichael Post (andrewpost(AT)gmail.com) wrote the program that generated this sequence and showed that for any 4 initial integers a(0),a(1),a(2),a(3) the length of the cycle eventually entered is a factor of 312. For instance, starting with (6,6,6,6) continues in a cycle of length 1 since SOD(6+6+6+6) = SOD(24) = 6; and 1 divides 312. For the SOD(tribonacci) which is A112661, the length of any cycle eventually entered is a factor of 78.
All terms for n >= 4 are 4, 7, or 10. The sequence has period 78; the 78 terms after the initial 1,1,1,1 repeat forever. - Nathaniel Johnston, May 04 2011

Examples

			a(0)=a(1)=a(2)=a(3)=1.
a(4) = SOD(1+1+1+1) = SOD(4) = 4.
a(5) = SOD(1+1+1+4) = SOD(7) = 7.
a(10) = SOD(4+7+4+4) = SOD(19) = 10, note that we do not iterate SOD to reduce 10 to 1.
		

Crossrefs

Programs

  • Maple
    A112677 := proc(n) option remember: if(n<=3)then return 1:fi: return add(d,d=convert(procname(n-1) + procname(n-2) + procname(n-3) + procname(n-4),base,10)): end: seq(A112677(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    nxt[{a_,b_,c_,d_}]:={b,c,d,Total[IntegerDigits[a+b+c+d]]}; Transpose[ NestList[ nxt,{1,1,1,1},90]][[1]] (* or *) PadRight[{1,1,1,1},120,{10,10,10,10,4,7,4,7,4,4,10,7,7,10,7,4,10,4,7,7,10,10,7,7,7,4,7,7,7,7,10,4,10,4,10,10,7,4,4,7,4,10,7,10,4,4,7,7,4,4,4,10,4,4,4,4,7,10,7,10,7,7,4,10,10,4,10,7,4,7,10,10,4,4,10,10,10,7}](* Harvey P. Dale, Mar 05 2016 *)

Formula

a(0)=a(1)=a(2)=a(3)=1. a(n) = SumDigits(a(n-1) + a(n-2) + a(n-3) + a(n-4)).
a(n) = SumDigits(A000288(n)).
a(n) = A007953(a(n-1) + a(n-2) + a(n-3) + a(n-4)). - Nathaniel Johnston, May 04 2011

Extensions

Name corrected by Nathaniel Johnston, May 04 2011

A374266 Smallest number reachable by a Fibonacci-like iteration where one has the option to either omit or keep zero digits.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 61, 438, 499, 937, 1436, 2373, 389, 2762, 1657, 1368, 325, 1693, 218, 1911, 2129, 44, 1516, 129, 394, 37, 53, 9, 62, 35, 133, 24, 121, 181, 95, 69, 11, 53, 19, 9, 19, 19, 2, 12, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4
Offset: 1

Views

Author

Bryle Morga, Jul 02 2024

Keywords

Comments

a(n) is the smallest f(n) such that f(1)=f(2)=1 and f(i) = OpNoz_i(f(i-1)+f(i-2)) for 2
Choosing to always remove zero digits at each step gives A243063. This strategy of always choosing to remove zeros is optimal for n < 23. For n >= 23, a(n) < A243063(n), i.e., the optimal path contains a step that keeps zeros.
Removal of zeros preserves the digital root giving the lower bound a(n) >= A030132(n). In fact, for n >= 53, a(n) = A030132(n). It follows that this sequence is eventually periodic with a period of 24.

Examples

			a(23) = 1657 via the path: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 1946, 8711, 1657.
		

Programs

  • Python
    def a(n):
        reach = {(1, 1)}
        for _ in range(n-1):
            newreach = set()
            for a, b in reach:
                newreach.update([(b, a+b), (b, int(str(a+b).replace('0', '')))])
            reach = newreach
        return min(reach, key = lambda k:k[0])[0]

Formula

a(n) <= A243063(n); Strict inequality for n >= 23.
a(n) = A030132(n) and a(n) = a(n+24) for n >= 53.

A112678 Sum of digits of previous 5 terms.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 9, 8, 6, 11, 12, 10, 11, 5, 13, 6, 9, 8, 5, 5, 6, 6, 3, 7, 9, 4, 11, 7, 11, 6, 12, 11, 11, 6, 10, 5, 7, 12, 4, 11, 12, 10, 13, 5, 6, 10, 8, 6, 8, 11, 7, 4, 9, 12, 7, 12, 8, 12, 6, 9, 11, 10, 12, 12, 9, 9, 7, 13, 5, 7, 5, 10, 4, 4, 3, 8, 11, 3, 11, 9, 6, 4, 6, 9, 7, 5, 4, 4, 11, 4
Offset: 0

Author

Jonathan Vos Post, Dec 30 2005

Keywords

Comments

This is to the pentanacci sequence A001591 as A112661 is to the tribonacci and as A030132 is to Fibonacci. A000322 is the pentanacci sequence (A001591) but starting with values (1,1,1,1,1). Andrew Carmichael Post (andrewpost(AT)gmail.com) wrote the program that generated this sequence and showed that for any 5 initial integers a(0),a(1),a(2),a(3),a(4) the length of the cycle eventually entered is a factor of 2184. For the SOD(teranacci) the limit cycle length is always a factor of 312. For the SOD(tribonacci) which is A112661, the length of any cycle eventually entered is a factor of 78.

Examples

			a(0)=a(1)=a(2)=a(3)=a(4)=1.
a(5) = SOD(1+1+1+1+1) = SOD(5) = 5.
a(6) = SOD(1+1+1+1+5) = SOD(9) = 9.
a(7) = SOD(1+1+1+5+9) = SOD(17) = 8.
a(8) = SOD(1+1+5+9+8) = SOD(24) = 6.
a(9) = SOD(1+5+9+8+6) = SOD(29) = 11, note that we do not iterate SOD to reduce 11 to 2.
		

Formula

a(0)=a(1)=a(2)=a(3)=a(4)=1. a(n) = SumDigits(a(n-1)+a(n-2)+a(n-3)+a(n-4)+a(n-5)). a(n) = SumDigits(A000322(n)).

A164743 Digital root of 3*A000045(n).

Original entry on oeis.org

3, 3, 6, 9, 6, 6, 3, 9, 3, 3, 6, 9, 6, 6, 3, 9, 3, 3, 6, 9, 6, 6, 3, 9, 3, 3, 6, 9, 6, 6, 3, 9
Offset: 1

Author

Mark Dols, Aug 24 2009

Keywords

Comments

Period 8.

Crossrefs

Formula

a(n+1) = sum of digits of a(n) + a(n-1).
a(n) = A010888(3*A000045(n)). - R. J. Mathar, Nov 03 2016
G.f.: -3*x*(1+x+2*x^2+3*x^3+2*x^4+2*x^5+x^6+3*x^7) / ( (x-1)*(1+x)*(x^2+1)*(x^4+1) ). - R. J. Mathar, Nov 03 2016

A216755 Digital root of the fifth power of Fibonacci(n).

Original entry on oeis.org

1, 1, 5, 9, 2, 8, 7, 9, 4, 1, 8, 9, 8, 8, 4, 9, 7, 1, 2, 9, 5, 8, 1, 9, 1, 1, 5, 9, 2, 8, 7, 9, 4, 1, 8, 9, 8, 8, 4, 9, 7, 1, 2, 9, 5, 8, 1, 9, 1, 1, 5, 9, 2, 8, 7, 9, 4, 1, 8, 9, 8, 8, 4, 9, 7, 1, 2, 9, 5, 8, 1, 9, 1, 1, 5, 9, 2, 8, 7, 9, 4, 1, 8, 9, 8, 8, 4, 9, 7, 1, 2, 9, 5, 8, 1, 9, 1, 1, 5, 9
Offset: 1

Author

Ravi Bhandari, Sep 15 2012

Keywords

Comments

This sequence is periodic with period 24, i.e. gcd(period of digital roots of squares of Fibonacci, period of digital roots of cubes of Fibonacci)

Crossrefs

Programs

  • Mathematica
    (* First run program for A211821 to define digitalRoot *) Table[digitalRoot[Fibonacci[n]^5], {n, 90}] (* Alonso del Arte, Sep 15 2012 *)
    LinearRecurrence[{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1},{1, 1, 5, 9, 2, 8, 7, 9, 4, 1, 8, 9, 8, 8, 4, 9},100] (* Ray Chandler, Aug 27 2015 *)

Formula

a(n) = A010888(A056572(n)).
a(n) = a(n-4) - a(n-12) + a(n-16). - R. J. Mathar, Sep 15 2012
G.f. x*( -1-x-5*x^2-9*x^3-x^4-7*x^5-2*x^6-2*x^8+7*x^9-x^10-5*x^12-8*x^13-x^14-9*x^15 ) / ( (x-1) *(1+x) *(x^2+1) *(x^4+1) *(x^8-x^4+1) ). - R. J. Mathar, Sep 15 2012

A322129 Digital roots of A057084.

Original entry on oeis.org

1, 8, 2, 6, 5, 1, 4, 6, 7, 8, 8, 9, 8, 1, 7, 3, 4, 8, 5, 3, 2, 1, 1, 9, 1, 8, 2, 6, 5, 1, 4, 6, 7, 8, 8, 9, 8, 1, 7, 3, 4, 8, 5, 3, 2, 1, 1, 9, 1, 8, 2, 6, 5, 1, 4, 6, 7, 8, 8, 9, 8, 1, 7, 3, 4, 8, 5, 3, 2, 1, 1
Offset: 1

Author

Ondrej Janicko, Nov 27 2018

Keywords

Comments

Periodic with period 24. The cycle is in reverse order to that of the digital roots of the Fibonacci numbers (A030132).

Crossrefs

Cf. A010888 (digital root), A057084, A030132 (order of cycle digits reversed), A000045, A015454, A041025, A114479, A164546.

Programs

  • GAP
    A057084:=[1,8];; for n in [3..80] do A057084[n]:=8*(A057084[n-1]-A057084[n-2]);; od; a:=List(A057084,i->1+(i-1) mod 9); # Muniru A Asiru, Nov 29 2018
  • Mathematica
    digRoot[n_]:=FixedPoint[Total[IntegerDigits[#, 10]] &, n] ; digRoot/@LinearRecurrence[{8, -8}, {1, 8}, 100]  (* Amiram Eldar, Nov 29 2018 *)

Formula

a(n) = A010888(A041025(n)) for n > 0.
a(n) = A010888(A057084(n)) for n > 0.
a(n) = A010888(A015454(n+3)) for n > 0.
a(n) = A010888(A114479(n+5)) for n > 0.
a(n) = A010888(A164546(n+3)) for n > 0.
a(n) = A030132(24 - (n mod 24)). - Filip Zaludek, Dec 09 2018
Previous Showing 11-19 of 19 results.