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-5 of 5 results.

A002452 a(n) = (9^n - 1)/8.

Original entry on oeis.org

0, 1, 10, 91, 820, 7381, 66430, 597871, 5380840, 48427561, 435848050, 3922632451, 35303692060, 317733228541, 2859599056870, 25736391511831, 231627523606480, 2084647712458321, 18761829412124890, 168856464709124011, 1519708182382116100, 13677373641439044901, 123096362772951404110
Offset: 0

Views

Author

Keywords

Comments

From David W. Wilson: Numbers triangular, differences square.
To be precise, the differences are the squares of the powers of three with positive indices. Hence a(n+1) - a(n) = (A000244(n+1))^2 = A001019(n+1). [Added by Ant King, Jan 05 2011]
Partial sums of A001019. This is m-th triangular number, where m is partial sums of A000244. a(n) = A000217(A003462(n)). - Lekraj Beedassy, May 25 2004
With offset 0, binomial transform of A003951. - Philippe Deléham, Jul 22 2005
Numbers in base 9: 1, 11, 111, 1111, 11111, 111111, 1111111, etc. - Zerinvary Lajos, Apr 26 2009
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=9, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det(A). - Milan Janjic, Feb 21 2010
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=10, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n >= 2, a(n-1) = (-1)^n*charpoly(A,1). - Milan Janjic, Feb 21 2010
From Hieronymus Fischer, Jan 30 2013: (Start)
Least index k such that A052382(k) >= 10^(n-1), for n > 0.
Also index k such that A052382(k) = (10^n-1)/9, n > 0.
A052382(a(n)) is the least zerofree number with n digits, for n > 0.
For n > 1: A052382(a(n)-1) is the greatest zerofree number with n-1 digits. (End)
For n > 0, 4*a(n) is the total number of holes in a certain triangle fractal (start with 9 triangles, 4 holes) after n iterations. See illustration in links. - Kival Ngaokrajang, Feb 21 2015
For n > 0, a(n) is the sum of the numerators and denominators of the reduced fractions 0 < (b/3^(n-1)) < 1 plus 1. Example for n=3 gives fractions 1/9, 2/9, 1/3, 4/9, 5/9, 2/3, 7/9, and 8/9 plus 1 has sum of numerators and denominators +1 = a(3) = 91. - J. M. Bergot, Jul 11 2015
Except for 0 and 1, all terms are Brazilian repunits numbers in base 9, so belong to A125134. All these terms are composite because a(n) is the ((3^n - 1)/2)-th triangular number. - Bernard Schott, Apr 23 2017
These are also the second steps after the junctions of the Collatz trajectories of 2^(2k-1)-1 and 2^2k-1. - David Rabahy, Nov 01 2017

Examples

			a(4) = (9^4 - 1)/8 = 820 = 1111_9 = (1/2) * 40 * 41 is the ((3^4 - 1)/2)-th = 40th triangular number. - _Bernard Schott_, Apr 23 2017
		

References

  • A. Fletcher, J. C. P. Miller, L. Rosenhead, and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 112.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • T. N. Thiele, Interpolationsrechnung. Teubner, Leipzig, 1909, p. 36.

Crossrefs

Right-hand column 1 in triangle A008958.

Programs

Formula

From Philippe Deléham, Mar 13 2004: (Start)
a(n) = 9*a(n-1) + 1; a(1) = 1.
G.f.: x / ((1-x)*(1-9*x)). (End)
a(n) = 10*a(n-1) - 9*a(n-2). - Ant King, Jan 05 2011
a(n) = floor(A000217(3^n)/4) - A033113(n-1). - Arkadiusz Wesolowski, Feb 14 2012
Sum_{n>0} a(n)*(-1)^(n+1)*x^(2*n+1)/(2*n+1)! = (1/6)*sin(x)^3. - Vladimir Kruchinin, Sep 30 2012
a(n) = A011540(A217094(n-1)) - A217094(n-1) + 2, n > 0. - Hieronymus Fischer, Jan 30 2013
a(n) = 10^(n-1) + 2 - A217094(n-1). - Hieronymus Fischer, Jan 30 2013
a(n) = det(|v(i+2,j+1)|, 1 <= i,j <= n-1), where v(n,k) are central factorial numbers of the first kind with odd indices (A008956) and n > 0. - Mircea Merca, Apr 06 2013
a(n) = Sum_{k=0..n-1} 9^k. - Doug Bell, May 26 2017
E.g.f.: exp(5*x)*sinh(4*x)/4. - Stefano Spezia, Mar 11 2023

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 08 2004
Offset changed from 1 to 0 and added 0 by Vincenzo Librandi, Jun 01 2011

A066443 Number of distinct paths of length 2n+1 along edges of a unit cube between two fixed adjacent vertices.

Original entry on oeis.org

1, 7, 61, 547, 4921, 44287, 398581, 3587227, 32285041, 290565367, 2615088301, 23535794707, 211822152361, 1906399371247, 17157594341221, 154418349070987, 1389765141638881, 12507886274749927, 112570976472749341
Offset: 0

Views

Author

John W. Layman, Aug 12 2002

Keywords

Comments

All members of sequence are also hex, or central hexagonal, numbers (A003215). (If n is a hex number, 9n - 2 is always a hex number; see recurrence.) - Matthew Vandermast, Mar 30 2003
The sequence 1,1,7,61,547,... with g.f. (1-9x+6x^2)/((1-x)(1-9x)) and a(n) = A054879(n)/3 + 2*0^n/3 gives the denominators in the probability that a random walk on the cube returns to its starting corner on the 2n-th step. - Paul Barry, Mar 11 2004
Equals row sums of even row terms of triangle A158303. - Gary W. Adamson, Mar 15 2009
It appears that a(n) is the n-th record value in A120437, which gives the differences of A037314 (positive integers n such that the sum of the base 3 digits of n equals the sum of the base 9 digits of n). - John W. Layman, Dec 14 2010
Numbers in base 9 are 1, 6+1, 66+1, 666+1, 6666+1, 66666+1, etc.; that is, n 6's + 1. - Yuchun Ji, Aug 15 2019
All prime factors of a(n) are 1 mod 6. In addition, if n is not 1 mod 3 (first index being n=0), then 3 is a cubic residue modulo all prime factors of a(n). This provides a simple proof that there are infinitely many primes 1 mod 6 that have 3 as a cubic residue. - William Hu, Jul 26 2024

Examples

			From _Michael B. Porter_, Aug 22 2016: (Start)
Give coordinates (a,b,c) to the vertices of the cube, where a, b, and c are either 0 or 1. For n = 1, the a(1) = 7 paths of length 2n + 1 = 3 from (0,0,0) to (0,0,1) are:
(0,0,0) -> (0,0,1) -> (0,0,0) -> (0,0,1)
(0,0,0) -> (0,0,1) -> (0,1,1) -> (0,0,1)
(0,0,0) -> (0,0,1) -> (1,0,1) -> (0,0,1)
(0,0,0) -> (0,1,0) -> (0,0,0) -> (0,0,1)
(0,0,0) -> (0,1,0) -> (0,1,1) -> (0,0,1)
(0,0,0) -> (1,0,0) -> (0,0,0) -> (0,0,1)
(0,0,0) -> (1,0,0) -> (1,0,1) -> (0,0,1) (End)
		

Crossrefs

Cf. A158303, A037314, A120437, A083234 (binomial transform), A083233 (inverse binomial transform), A054879 (recurrent walks), A125857 (walks ending on face diagonal), A054880 (walks ending on space diagonal).

Programs

  • Magma
    [(3^(2*n+1)+1)/4: n in [0..20]]; // Vincenzo Librandi, Jun 16 2011
    
  • Maple
    seq((3^(2*n+1) + 1)/4, n=0..18); # Zerinvary Lajos, Jun 16 2007
  • Mathematica
    NestList[9 # - 2 &, 1, 18] (* or *)
    Table[(3^(2 n + 1) + 1)/4, {n, 0, 18}] (* or *)
    CoefficientList[Series[(1 - 3 x)/((1 - x) (1 - 9 x)), {x, 0, 18}], x] (* Michael De Vlieger, Aug 22 2016 *)
  • PARI
    a(n)=3^(2*n+1)\/4 \\ Charles R Greathouse IV, Jul 02 2013
    
  • PARI
    Vec((1-3*x)/((1-x)*(1-9*x)) + O(x^50)) \\ Altug Alkan, Nov 13 2015

Formula

a(n) = (3^(2*n+1)+1)/4. - Vladeta Jovovic, Dec 22 2002
a(n) = 9*a(n-1) - 2. - Matthew Vandermast, Mar 30 2003
From Paul Barry, Apr 21 2003: (Start)
G.f.: (1-3*x)/((1-x)*(1-9*x)).
E.g.f.: (3*exp(9*x) + exp(x))/4. (End)
a(n) = (-1)^n times the (i, i)-th element of M^n (for any i), where M = ((1, 1, 1, -2), (1, 1, -2, 1), (1, -2, 1, 1), (-2, 1, 1, 1)). - Simone Severini, Nov 25 2004
a(n) = Sum_{k=0..n} binomial(2*n+1, 2*k)*4^(n-k). - Paul Barry, Jan 22 2005
a(n) = A054880(n) + 1.
a(n) = A057660(3^n). - Henry Bottomley, Nov 08 2015
a(n) = Sum_{k=0..2n} (-3)^k == 1 + Sum_{k=1..n} 2*3^(2k-1). - Bob Selcoe, Aug 21 2016
a(n) = 3^(2*n+1) * a(-1-n) for all n in Z. - Michael Somos, Jul 02 2017
a(n) = 6*A002452(n) + 1. - Yuchun Ji, Aug 15 2019

Extensions

Corrected by Vladeta Jovovic, Dec 22 2002

A191681 a(n) = (9^n - 1)/2.

Original entry on oeis.org

0, 4, 40, 364, 3280, 29524, 265720, 2391484, 21523360, 193710244, 1743392200, 15690529804, 141214768240, 1270932914164, 11438396227480, 102945566047324, 926510094425920, 8338590849833284, 75047317648499560, 675425858836496044
Offset: 0

Views

Author

Adi Dani, Jun 11 2011

Keywords

Comments

Number of compositions of odd numbers into n parts < 9.
These are also the junctions of the Collatz trajectories of 2^(2k-1)-1 and 2^2k-1. - David Rabahy, Nov 01 2017
a(n) gives the number of turns in the n-th iteration of the Peano curve given by plotting (A163528, A163529) or by (Siromoney 1982). - Jason V. Morgan, Oct 08 2021

Examples

			a(2)=40: there are 40 compositions of odd numbers into 2 parts < 9:
1:  (0,1),(1,0);
3:  (0,3),(3,0),(1,2),(2,1);
5:  (0,5),(5,0),(1,4),(4,1),(2,3),(3,2);
7:  (0,7),(7,0),(1,6),(6,1),(2,5),(5,2),(3,4),(4,3);
9:  (1,8),(8,1),(2,7),(7,2),(3,6),(6,3),(4,5),(5,4);
11: (3,8),(8,3),(4,7),(7,4),(5,6),(6,5);
13: (5,8),(8,5),(6,7),(7,6);
15: (7,8),(8,7).
		

Crossrefs

Programs

Formula

a(0)=0, a(1)=4, a(n) = 10*a(n-1) - 9*a(n-2). - Harvey P. Dale, Jun 19 2011
G.f.: 4*x / ((x-1)*(9*x-1)). - Colin Barker, May 16 2013
a(n) = 2 * A125857(n+1) = 4 * A002452(n). - Bernard Schott, Oct 29 2021

Extensions

Example corrected by L. Edson Jeffery, Feb 13 2015

A273514 a(n) is the number of arithmetic progressions m < n < p (three numbers in arithmetic progression) such that m and p contain no 2's in their ternary representation.

Original entry on oeis.org

0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 8, 2, 2, 2, 2, 2, 2, 0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 8, 2, 2, 2, 2, 2, 2, 2, 2, 8, 2, 2, 8, 8, 8, 8, 2, 2, 8, 2, 2, 2, 2, 2, 2, 2, 2, 8, 2, 2, 2, 2, 2, 2, 0, 0, 2, 0, 0, 2
Offset: 0

Views

Author

Max Barrentine, May 23 2016

Keywords

Comments

This is a recursive sequence that gives the number of times n is rejected from A005836, if n is the middle member of an arithmetic triple whose first and last terms are contained in A005836.
Also, a(n) is the number of unordered pairs of members of A005836 whose average (arithmetic mean) is n.
It appears that when A273513(n) and A262097(n) are coprime, a(n) = 2.
Local maxima occur at a(A125857(n)).

Examples

			a(2) = 2 because there are two arithmetic triples a < 2 < b such that a and b are members of A005836: 0, 2, 4 and 1, 2, 3.
		

Crossrefs

Programs

  • PARI
    precCantor(n)=my(v=digits(n,3)); for(i=1,#v, if(v[i]==2, for(j=i,#v,v[j]=1); break)); fromdigits(v,2)
    a(n)=if(n==0, return(0)); sum(i=0,precCantor(n-1), my(m=fromdigits(digits(i,2),3)); vecmax(digits(2*n-m,3))<2) \\ Charles R Greathouse IV, Jun 17 2016

Formula

a(0) = 0, a(n) = a(3n) = a(3n+1); if a(n) = 0, a(9n + 2) = 2, otherwise a(9n + 2) = 4a(n); a(9n + 5) = a(9n + 6) = a(9n + 7) = a(9n + 8) = a(3n + 2).

A125725 Numbers whose base-7 representation is 222....2.

Original entry on oeis.org

0, 2, 16, 114, 800, 5602, 39216, 274514, 1921600, 13451202, 94158416, 659108914, 4613762400, 32296336802, 226074357616, 1582520503314, 11077643523200, 77543504662402, 542804532636816, 3799631728457714, 26597422099204000
Offset: 1

Views

Author

Zerinvary Lajos, Feb 02 2007

Keywords

Examples

			base 7.......decimal
0..................0
2..................2
22................16
222..............114
2222.............800
22222...........5602
222222.........39216
2222222.......274514
22222222.....1921600
222222222...13451202
etc...........etc.
		

Crossrefs

Cf. also A002276, A005610, A020988, A024023, A125831, A125835, A125857 for related or similarly constructed sequences.

Programs

  • GAP
    List([1..25], n-> (7^(n-1) -1)/3); # G. C. Greubel, May 23 2019
  • Magma
    [0] cat [n:n in [1..15000000]| Set(Intseq(n,7)) subset [2]]; // Marius A. Burtea, May 06 2019
    
  • Magma
    [(7^(n-1)-1)/3: n in [1..25]]; // Marius A. Burtea, May 06 2019
    
  • Maple
    seq(2*(7^n-1)/6, n=0..25);
  • Mathematica
    FromDigits[#,7]&/@Table[PadLeft[{2},n,2],{n,0,25}]  (* Harvey P. Dale, Apr 13 2011 *)
    (7^(Range[25]-1) - 1)/3 (* G. C. Greubel, May 23 2019 *)
  • PARI
    vector(25, n, (7^(n-1)-1)/3) \\ Davis Smith, Apr 04 2019
    
  • Sage
    [(7^(n-1) -1)/3 for n in (1..25)] # G. C. Greubel, May 23 2019
    

Formula

a(n) = (7^(n-1) - 1)/3 = 2*A023000(n-1).
a(n) = 7*a(n-1) + 2, with a(1)=0. - Vincenzo Librandi, Sep 30 2010
G.f.: 2*x^2 / ( (1-x)*(1-7*x) ). - R. J. Mathar, Sep 30 2013
From Davis Smith, Apr 04 2019: (Start)
A007310(a(n) + 1) = 7^(n - 1).
A047522(a(n + 1)) = -1*A165759(n). (End)
E.g.f.: (exp(7*x) - 7*exp(x) + 6)/21. - Stefano Spezia, Jan 12 2025

Extensions

Offset corrected by N. J. A. Sloane, Oct 02 2010
Showing 1-5 of 5 results.