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.

Showing 1-10 of 18 results. Next

A153130 Period 6: repeat [1, 2, 4, 8, 7, 5].

Original entry on oeis.org

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, 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, 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, 4, 8, 7, 5
Offset: 0

Views

Author

Paul Curtz, Dec 19 2008

Keywords

Comments

Digital root of 2^n.
A regular version of Pitoun's sequence: a(n) = A029898(n+1).
Also obtained from permutations of A141425, A020806, A070366, A153110, A153990, A154127, A154687, or A154815.
This sequence and its (again period 6) repeated differences produce the table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, -1, -2, -4, 1, 2, 4, -1, -2, ...
1, 2, -5, -1, -2, 5, 1, 2, -5, -1, -2, ...
1, -7, 4, -1, 7, -4, 1, -7, 4, -1, 7, ...
-8, 11, -5, 8,-11, 5, -8, 11, -5, 8,-11, ...
19,-16, 13,-19, 16,-13, 19,-16, 13,-19, 16, ...
-35, 29,-32, 35,-29, 32,-35, 29,-32, 35,-29, ...
64,-61, 67,-64, 61,-67, 64,-61, 67,-64, 61, ...
If each entry of this table is read modulo 9 we obtain the very regular table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
Also the decimal expansion of the constant 125/1001. - R. J. Mathar, Jan 23 2009
Digital root of the powers of any number congruent to 2 mod 9. - Alonso del Arte, Jan 26 2014

References

  • Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

Crossrefs

Cf. digital roots of powers of c mod 9: c = 4, A100402; c = 5, A070366; c = 7, A070403; c = 8, A010689.

Programs

Formula

a(n) + a(n+3) = 9 = A010734(n).
G.f.: (1+x+2x^2+5x^3)/((1-x)(1+x)(1-x+x^2)). - R. J. Mathar, Jan 23 2009
a(n) = A082365(n) mod 9. - Paul Curtz, Mar 31 2009
a(n) = -1/2*cos(Pi*n) - 3*cos(1/3*Pi*n) - 3^(1/2)*sin(1/3*Pi*n) + 9/2. - Leonid Bedratyuk, May 13 2012
a(n) = A010888(A004000(n+1)). - Ivan N. Ianakiev, Nov 27 2014
From Wesley Ivan Hurt, Apr 20 2015: (Start)
a(n) = a(n-6) for n>5.
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
a(n) = (2+3*(n-1 mod 3))*(n mod 2) + (1+3*(-n mod 3))*(n-1 mod 2). (End)
a(n) = 2^n mod 9. - Nikita Sadkov, Oct 06 2018
From Stefano Spezia, Mar 20 2025: (Start)
E.g.f.: 4*cosh(x) - exp(x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 5*sinh(x).
a(n) = A007953(2*a(n-1)) = A010888(2*a(n-1)). (End)

Extensions

Edited by R. J. Mathar, Apr 09 2009

A007612 a(n+1) = a(n) + digital root (A010888) of a(n).

Original entry on oeis.org

1, 2, 4, 8, 16, 23, 28, 29, 31, 35, 43, 50, 55, 56, 58, 62, 70, 77, 82, 83, 85, 89, 97, 104, 109, 110, 112, 116, 124, 131, 136, 137, 139, 143, 151, 158, 163, 164, 166, 170, 178, 185, 190, 191, 193, 197, 205, 212, 217, 218, 220, 224, 232, 239, 244, 245, 247, 251
Offset: 1

Views

Author

Keywords

Comments

Take m, a natural number. If m == 1 (mod 6), then for every n a(m)*a(n) is in A007612. - Ivan N. Ianakiev, May 08 2013

References

  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 65.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007612 n = a007612_list !! (n-1)
    a007612_list = iterate a064806 1  -- Reinhard Zumkeller, Apr 13 2013
    
  • Maple
    A007612 := proc(n) option remember: if(n=1)then return 1: fi: return procname(n-1) + ((procname(n-1)-1) mod 9) + 1: end: seq(A007612(n), n=1..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    dr[n_]:=NestWhile[Total[IntegerDigits[#]]&,n,#>9&]; NestList[#+dr[#]&, 1,60] (* Harvey P. Dale, Sep 24 2011 *)
    NestList[#+Mod[#,9]&,1,60] (* Harvey P. Dale, Sep 14 2016 *)
  • PARI
    first(n)=my(v=vector(n)); v[1]=1; for(k=2,n, v[k]=v[k-1]+v[k-1]%9); v \\ Charles R Greathouse IV, Jun 25 2017
    
  • PARI
    a(n)=n\6*27 + [-4,1,2,4,8,16][n%6+1] \\ Charles R Greathouse IV, Jun 25 2017

Formula

a(1) = 1, a(n+1) = a(n) + a(n) mod 9. - Reinhard Zumkeller, Mar 23 2003
First differences are [1,2,4,8,7,5] repeated. - M. F. Hasler, Sep 15 2009; corrected by John Keith, Aug 17 2022
n == 1, 2, 4, 8, 16, or 23 (mod 27). - Dean Hickerson, Mar 25 2003
Limit_{n->oo} a(n)/n = 9/2; A029898(n) = a(n+1) - a(n) = A010888(a(n)). - Reinhard Zumkeller, Feb 27 2006
a(6n+1)=27n+1, a(6n+2)=27n+2, a(6n+3)=27n+4, a(6n+4)=27n+8, a(6n+5)=27n+16, a(6n+6)=27n+23. - Franklin T. Adams-Watters, Mar 13 2006
G.f.: (1+4*x^4+3*x^3+x^2)/((x+1)*(x^2-x+1)*(x-1)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009
a(n+1) = A064806(a(n)). - Reinhard Zumkeller, Apr 13 2013

A167762 a(n) = 2*a(n-1)+3*a(n-2)-6*a(n-3) starting a(0)=a(1)=0, a(2)=1.

Original entry on oeis.org

0, 0, 1, 2, 7, 14, 37, 74, 175, 350, 781, 1562, 3367, 6734, 14197, 28394, 58975, 117950, 242461, 484922, 989527, 1979054, 4017157, 8034314, 16245775, 32491550, 65514541, 131029082, 263652487, 527304974, 1059392917, 2118785834, 4251920575, 8503841150
Offset: 0

Views

Author

Paul Curtz, Nov 11 2009

Keywords

Comments

Inverse binomial transform yields two zeros followed by A077917 (a signed variant of A127864).
a(n) mod 10 is zero followed by a sequence with period length 8: 0, 1, 2, 7, 4, 7, 4, 5 (repeat).
a(n) is the number of length n+1 binary words with some prefix w such that w contains three more 1's than 0's and no prefix of w contains three more 0's than 1's. - Geoffrey Critzer, Dec 13 2013
From Gus Wiseman, Oct 06 2023: (Start)
Also the number of subsets of {1..n} with two distinct elements summing to n + 1. For example, the a(2) = 1 through a(5) = 14 subsets are:
{1,2} {1,3} {1,4} {1,5}
{1,2,3} {2,3} {2,4}
{1,2,3} {1,2,4}
{1,2,4} {1,2,5}
{1,3,4} {1,3,5}
{2,3,4} {1,4,5}
{1,2,3,4} {2,3,4}
{2,4,5}
{1,2,3,4}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
{2,3,4,5}
{1,2,3,4,5}
The complement is counted by A038754.
Allowing twins gives A167936, complement A108411.
For n instead of n + 1 we have A365544, complement A068911.
The version for all subsets (not just pairs) is A366130.
(End)

Crossrefs

First differences are A167936, complement A108411.

Programs

  • Mathematica
    LinearRecurrence[{2,3,-6},{0,0,1},40] (* Harvey P. Dale, Sep 17 2013 *)
    CoefficientList[Series[x^2/((2 x - 1) (3 x^2 - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 17 2013 *)
    Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Subsets[#,{2}],n+1]&]],{n,0,10}] (* Gus Wiseman, Oct 06 2023 *)

Formula

a(n) mod 9 = A153130(n), n>3 (essentially the same as A154529, A146501 and A029898).
a(n+1)-2*a(n) = 0 if n even, = A000244((1+n)/2) if n odd.
a(2*n) = A005061(n). a(2*n+1) = 2*A005061(n).
G.f.: x^2/((2*x-1)*(3*x^2-1)). a(n) = 2^n - A038754(n). - R. J. Mathar, Nov 12 2009
G.f.: x^2/(1-2*x-3*x^2+6*x^3). - Philippe Deléham, Nov 11 2009

Extensions

Edited and extended by R. J. Mathar, Nov 12 2009

A132805 A trisection of A024495.

Original entry on oeis.org

0, 3, 21, 171, 1365, 10923, 87381, 699051, 5592405, 44739243, 357913941, 2863311531, 22906492245, 183251937963, 1466015503701, 11728124029611, 93824992236885, 750599937895083, 6004799503160661, 48038396025285291, 384307168202282325, 3074457345618258603
Offset: 0

Views

Author

Paul Curtz, Nov 18 2007

Keywords

Crossrefs

Cf. A029898.

Programs

  • Magma
    [-(1/3)*(-1)^n+(1/3)*8^n: n in [0..25]]; // Vincenzo Librandi, Aug 10 2011
  • Mathematica
    LinearRecurrence[{7,8},{0,3},40] (* Harvey P. Dale, Feb 08 2015 *)

Formula

From Philippe Deléham, Nov 19 2007: (Start)
a(n) = A132804(n)/2.
G.f.: 3x/(1 - 7*x - 8*x^2).
a(n+1) = 7*a(n) + 8*a(n-1) for n >= 1, a(0)=0, a(1)=3. (End)
a(n) = 3*A015565(n). - R. J. Mathar, Aug 07 2017

A086353 Fixed point if nonzero-digit product of n! is iterated.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=10, 10!=362880, iteration list={3628800,2304,24,8},a(10)=8.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, w! ], {w, 1, 128}]

Formula

a(n)=A051802[n! ]=fixed-point of A051801[n! ]

A146501 Period 6: repeat [4,8,7,5,1,2].

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Paul Curtz, Oct 30 2008

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,0,-1,1},{4,8,7,5},102] (* Ray Chandler, Jul 15 2015 *)
    PadRight[{},120,{4,8,7,5,1,2}] (* Harvey P. Dale, Apr 01 2024 *)

Formula

G.f.: (4+4*x-x^2+2*x^3)/((1-x)*(1+x)*(1-x+x^2)). - Jaume Oliver Lafont, Aug 30 2009

Extensions

Extended by Ray Chandler, Jul 15 2015

A154127 Period 6: repeat [1, 2, 5, 8, 7, 4].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 05 2009

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, Feb 25 2009, Mar 09 2009: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
G.f.: (1+x+3*x^2+4*x^3)/((1-x)*(1+x)*(x^2-x+1)). (End)
a(n) = (27-cos(n*Pi)-20*cos(n*Pi/3)-4*sqrt(3)*sin(n*Pi/3))/6. - Wesley Ivan Hurt, Jun 17 2016

Extensions

Corrected numerator in g.f R. J. Mathar, Mar 09 2009

A086358 Digital root of n!.

Original entry on oeis.org

1, 1, 2, 6, 6, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Comments

a(n) = 9 for n >= 6.

Examples

			n = 5, 5 != 120, iteration list = {120,3}, a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    sud[x_] := Apply[Plus, DeleteCases[IntegerDigits[x], 0]]; Table[FixedPoint[sud, w!], {w, 1, 87}]

Formula

a(n) = A010888(n!) = fixed-point of A007953(n!). It equals n! modulo(9); at r = 0 use 9.
G.f.: (1 + x^2 + 4*x^3 - 3*x^5 + 6*x^6)/(1 - x). - Stefano Spezia, Jan 26 2023

Extensions

a(0) = 1 prepended by Alois P. Heinz, Dec 05 2018

A086360 The n-th primorial number reduced modulo 9.

Original entry on oeis.org

1, 2, 6, 3, 3, 6, 6, 3, 3, 6, 3, 3, 3, 6, 6, 3, 6, 3, 3, 3, 6, 6, 6, 3, 6, 6, 3, 3, 6, 6, 3, 3, 6, 3, 3, 6, 6, 6, 6, 3, 6, 3, 3, 6, 6, 3, 3, 3, 3, 6, 6, 3, 6, 6, 3, 6, 3, 6, 6, 6, 3, 3, 6, 6, 3, 3, 6, 6, 6, 3, 3, 6, 3, 3, 3, 3, 6, 3, 3, 6, 6, 3, 3, 6, 6, 6, 3, 6
Offset: 0

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Comments

a(n) is the fixed point reached by decimal-digit-sum-function (A007953), when starting the iteration from the value of the n-th primorial, A002110(n). - The (edited) original definition of the sequence, which is equal to a simple definition a(n) = A002110(n) mod 9, because taking the decimal digit sum preserves congruence modulo 9. - Antti Karttunen, Nov 14 2024
Only a(0)=1 and a(1)=2; each subsequent term is either a 3 or a 6.

Examples

			For n=7, 7th primorial = 510510, list of iterated digit sums is {510510,12,3}, thus a(7)=3.
		

Crossrefs

Programs

  • Maple
    A086360 := proc(n) option remember: if(n=1)then return 2:fi: return ithprime(n)*procname(n-1) mod 9: end: seq(A086360(n), n=1..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    sud[x_] := Apply[Plus, DeleteCases[IntegerDigits[x], 0]] q[x_] := Apply[Times, Table[Prime[w], {w, 1, x}]] Table[FixedPoint[sud, q[w]], {w, 1, 128}]
  • PARI
    up_to = 19683;
    A086360list(up_to_n) = { my(m=9, v=vector(1+up_to_n), pr=1); v[1] = 1; for(n=1, up_to_n, pr = (pr*prime(n))%m; v[1+n] = pr); (v); };
    v086360 = A086360list(up_to);
    A086360(n) = v086360[1+n]; \\ Antti Karttunen, Nov 14 2024

Formula

a(n) = A010878(A002110(n)) = A002110(n) mod 9.
a(n) = A010888(A002110(n)).

Extensions

Term a(0)=1 prepended, old definition moved to comments and replaced with one of the formulas, keyword:base removed because not really base-dependent - Antti Karttunen, Nov 14 2024

A086354 Fixed point if (nonzero-digit product)-function at initial value 2^n is iterated.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=20, 2^20=1048576, iteration list={1048576,6720,84,32,6}, so a(20)=6.
		

Crossrefs

Programs

  • Maple
    A051801 := proc(n) local d,j: d:=convert(n,base,10): return mul(`if`(d[j]=0,1,d[j]), j=1..nops(d)): end: A086354 := proc(n) local m: m:=2^n: while(length(m)>1)do m:=A051801(m): od: return m: end: seq(A086354(n),n=1..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, 2^w], {w, 1, 128}]

Formula

a(n) = A051802(2^n) = fixed point of A051801(2^n).
Showing 1-10 of 18 results. Next