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 25 results. Next

A034472 a(n) = 3^n + 1.

Original entry on oeis.org

2, 4, 10, 28, 82, 244, 730, 2188, 6562, 19684, 59050, 177148, 531442, 1594324, 4782970, 14348908, 43046722, 129140164, 387420490, 1162261468, 3486784402, 10460353204, 31381059610, 94143178828, 282429536482, 847288609444, 2541865828330, 7625597484988
Offset: 0

Views

Author

Keywords

Comments

Companion numbers to A003462.
a(n) = A024101(n)/A024023(n). - Reinhard Zumkeller, Feb 14 2009
Mahler exhibits this sequence with n>=2 as a proof that there exists an infinite number of x coprime to 3, such that x belongs to A005836 and x^2 belong to A125293. - Michel Marcus, Nov 12 2012
a(n-1) is the number of n-digit base 3 numbers that have an even number of digits 0. - Yifan Xie, Jul 13 2024

Examples

			a(3)=28 because 4*a(2)-3*a(1)=4*10-3*4=28 (28 is also 3^3 + 1).
G.f. = 2 + 4*x + 10*x^2 + 28*x^3 + 82*x^4 + 244*x^5 + 730*x^5 + ...
		

References

  • Knuth, Donald E., Satisfiability, Fascicle 6, volume 4 of The Art of Computer Programming. Addison-Wesley, 2015, pages 148 and 220, Problem 191.
  • P. Ribenboim, The Little Book of Big Primes, Springer-Verlag, NY, 1991, pp. 35-36, 53.

Crossrefs

Programs

  • Magma
    [3^n+1: n in [0..30]]; // Vincenzo Librandi, Jan 11 2017
  • Maple
    ZL:= [S, {S=Union(Sequence(Z), Sequence(Union(Z, Z, Z)))}, unlabeled]: seq(combstruct[count](ZL, size=n), n=0..25); # Zerinvary Lajos, Jun 19 2008
    g:=1/(1-3*z): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)+1, n=0..31); # Zerinvary Lajos, Jan 09 2009
  • Mathematica
    Table[3^n + 1, {n, 0, 24}]
  • PARI
    a(n) = 3^n + 1
    
  • PARI
    Vec(2*(1-2*x)/((1-x)*(1-3*x)) + O(x^50)) \\ Altug Alkan, Nov 15 2015
    
  • Sage
    [lucas_number2(n,4,3) for n in range(27)] # Zerinvary Lajos, Jul 08 2008
    
  • Sage
    [sigma(3,n) for n in range(27)] # Zerinvary Lajos, Jun 04 2009
    
  • Sage
    [3^n+1 for n in range(30)] # Bruno Berselli, Jan 11 2017
    

Formula

a(n) = 3*a(n-1) - 2 = 4*a(n-1) - 3*a(n-2). (Lucas sequence, with A003462, associated to the pair (4, 3).)
G.f.: 2*(1-2*x)/((1-x)*(1-3*x)). Inverse binomial transforms yields 2,2,4,8,16,... i.e., A000079 with the first entry changed to 2. Binomial transform yields A063376 without A063376(-1). - R. J. Mathar, Sep 05 2008
E.g.f.: exp(x) + exp(3*x). - Mohammad K. Azarian, Jan 02 2009
a(n) = A279396(n+3,3). - Wolfdieter Lang, Jan 10 2017
a(n) = 2*A007051(n). - R. J. Mathar, Apr 07 2022

Extensions

Additional comments from Rick L. Shepherd, Feb 13 2002

A024023 a(n) = 3^n - 1.

Original entry on oeis.org

0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, 59048, 177146, 531440, 1594322, 4782968, 14348906, 43046720, 129140162, 387420488, 1162261466, 3486784400, 10460353202, 31381059608, 94143178826, 282429536480, 847288609442, 2541865828328, 7625597484986, 22876792454960
Offset: 0

Views

Author

Keywords

Comments

Number of different directions along lines and hyper-diagonals in an n-dimensional cubic lattice for the attacking queens problem (A036464 in n=2, A068940 in n=3 and A068941 in n=4). The n-dimensional direction vectors have the a(n)+1 Cartesian coordinates (i,j,k,l,...) where i,j,k,l,... = -1, 0, or +1, excluding the zero-vector i=j=k=l=...=0. The corresponding hyper-line count is A003462. - R. J. Mathar, May 01 2006
Total number of sequences of length m=1,...,n with nonzero integer elements satisfying the condition Sum_{k=1..m} |n_k| <= n. See the K. A. Meissner link p. 6 (with a typo: it should be 3^([2a]-1)-1). - Wolfdieter Lang, Jan 21 2008
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x and y are disjoint and either 0) x is a proper subset of y or y is a proper subset of x, or 1) x is not a subset of y and y is not a subset of x. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Number of neighbors in Moore's neighborhood in n dimensions. - Dmitry Zaitsev, Nov 30 2015
Number of terms in conjunctive normal form of Boolean expression with n variables. E.g., a(2) = 8: [~x, ~y, x, y, ~x|~y, ~x|y, x|~y, x|y]. - Yuchun Ji, May 12 2023
Number of rays of the Coxeter arrangement of type B_n. Equivalently, number of facets of the n-dimensional type B permutahedron. - Jose Bastidas, Sep 12 2023

Examples

			From _Zerinvary Lajos_, Jan 14 2007: (Start)
Ternary......decimal:
0...............0
2...............2
22..............8
222............26
2222...........80
22222.........242
222222........728
2222222......2186
22222222.....6560
222222222...19682
2222222222..59048
etc...........etc.
(End)
Sequence combinatorics: n=3: With length m=1: [1],[2],[3] each with 2 signs, with m=2: [1,1], [1,2], [2,1], each 2^2 = 4 times from choosing signs; m=3: [1,1,1] coming in 2^3 signed versions: 3*2 + 3*4 + 1*8 = 26 = a(3). The order is important, hence the M_0 multinomials A048996 enter as factors.
A027902 gives the 384 divisors of a(24). - _Reinhard Zumkeller_, Mar 11 2010
		

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.

Crossrefs

Cf. triangle A013609.
Cf. second column of A145901.

Programs

Formula

a(n) = A000244(n) - 1.
a(n) = 2*A003462(n). - R. J. Mathar, May 01 2006
A128760(a(n)) > 0. - Reinhard Zumkeller, Mar 25 2007
G.f.: 2*x/((-1+x)*(-1+3*x)) = 1/(-1+x) - 1/(-1+3*x). - R. J. Mathar, Nov 19 2007
a(n) = Sum_{k=1..n} Sum_{m=1..k} binomial(k-1,m-1)*2^m, n >= 1. a(0)=0. From the sequence combinatorics mentioned above. Twice partial sums of powers of 3.
E.g.f.: e^(3*x) - e^x. - Mohammad K. Azarian, Jan 14 2009
a(n) = A024101(n)/A034472(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = 3*a(n-1) + 2 (with a(0)=0). - Vincenzo Librandi, Nov 19 2010
E.g.f.: -E(0) where E(k) = 1 - 3^k/(1 - x/(x - 3^k*(k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
a(n) = A227048(n,A020914(n)). - Reinhard Zumkeller, Jun 30 2013
Sum_{n>=1} 1/a(n) = A214369. - Amiram Eldar, Nov 11 2020
a(n) = Sum_{k=1..n} 2^k*binomial(n,k). - Ridouane Oudra, Jun 15 2025
From Peter Bala, Jul 01 2025: (Start)
For n >= 1, a(2*n)/a(n) = A034472(n) and a(3*n)/a(n) = A034513(n).
Modulo differences in offsets, exp( Sum_{n >= 1} a(k*n)/a(n)*x^n/n ) is the o.g.f. of A003462 (k = 2), A006100 (k = 3), A006101 (k = 4), A006102 (k = 5), A022196 (k = 6), A022197 (k = 7), A022198 (k = 8), A022199 (k = 9), A022200 (k = 10), A022201 (k = 11), A022202 (k = 12) and A022203 (k = 13).
The following are all examples of telescoping series:
Sum_{n >= 1} 3^n/(a(n)*a(n+1)) = 1/2^2; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/(2*8^2).
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+k)) = 1/(a(1)*a(2)*...*a(k)*a(k)).
Sum_{n >= 1} 3^n/(a(n)*a(n+2)) = 5/64; Sum_{n >= 1} (-3)^n/(a(n)*a(n+2)) = -3/64.
Sum_{n >= 1} 3^n/(a(n)*a(n+4)) = 703/83200; Sum_{n >= 1} (-3)^n/(a(n)*a(n+4)) = - 417/83200. (End)

A027877 a(n) = Product_{i=1..n} (9^i - 1).

Original entry on oeis.org

1, 8, 640, 465920, 3056435200, 180476385689600, 95912370410881024000, 458745798479390789599232000, 19747501938318761090457052119040000, 7650586837724400321220283274999910891520000
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005329 (q=2), A027871 (q=3), A027637 (q=4), A027872 (q=5), A027873 (q=6), A027875 (q=7), A027876 (q=8), A027878 (q=10), A027879 (q=11), A027880 (q=12).
Cf. A132037.

Programs

  • Magma
    [1] cat [&*[ 9^k-1: k in [1..n] ]: n in [1..11]]; // Vincenzo Librandi, Dec 24 2015
    
  • Mathematica
    Abs@QPochhammer[9, 9, Range[0, 10]] (* Vladimir Reshetnikov, Nov 20 2015 *)
  • PARI
    a(n) = prod(i=1, n, 9^i-1); \\ Altug Alkan, Dec 24 2015

Formula

a(n) ~ c * 3^(n*(n+1)), where c = Product_{k>=1} (1-1/9^k) = A132037 = 0.876560354035964205836019838417862010106635101174... . - Vaclav Kotesovec, Nov 21 2015
From - G. C. Greubel, Dec 24 2015: (Start)
8^n * 10^(floor(n/2))|a(n), for n>=0.
a(n) = 9^(binomial(n+1,2))*(1/9;1/9){n}, where (a;q){n} is the q-Pochhammer symbol. (End)
a(n) = Product_{i=1..n} A024101(i). - Michel Marcus, Dec 27 2015
G.f.: Sum_{n>=0} 9^(n*(n+1)/2)*x^n / Product_{k=0..n} (1 + 9^k*x). - Ilya Gutkovskiy, May 22 2017
Sum_{n>=0} (-1)^n/a(n) = A132037. - Amiram Eldar, May 07 2023

A082838 Decimal expansion of Kempner series Sum_{k>=1, k has no digit 9 in base 10} 1/k.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Apr 14 2003

Keywords

Comments

Numbers with a digit 9 (A011539) have asymptotic density 1, i.e., here almost all terms are removed from the harmonic series, which makes convergence less surprising. See A082839 (the analog for digit 0) for more information about such so-called Kempner series. - M. F. Hasler, Jan 13 2020

Examples

			22.920676619264150348163657094375931914944762436998481568541998356... - _Robert G. Wilson v_, Jun 01 2009
		

References

  • Julian Havil, Gamma, Exploring Euler's Constant, Princeton University Press, Princeton and Oxford, 2003, page 34.

Crossrefs

Cf. A002387, A007095 (numbers with no '9'), A011539 (numbers with a '9'), A024101.
Cf. A082830 .. A082839 (analog for digits 1, ..., 8 and 0), A140502.

Programs

  • Mathematica
    (* see the Mmca in Wolfram Library Archive link *)

Formula

Equals Sum_{k in A007095\{0}} 1/k, where A007095 = numbers with no digit 9. - M. F. Hasler, Jan 15 2020

Extensions

More terms from Robert G. Wilson v, Apr 14 2009
More terms from Robert G. Wilson v, Jun 01 2009
Minor edits by M. F. Hasler, Jan 13 2020

A057952 Number of prime factors of 9^n - 1 (counted with multiplicity).

Original entry on oeis.org

3, 5, 5, 7, 6, 8, 5, 10, 8, 10, 7, 11, 5, 9, 11, 12, 8, 12, 7, 13, 11, 11, 6, 17, 10, 9, 13, 13, 9, 17, 8, 14, 12, 12, 11, 16, 8, 11, 15, 18, 8, 18, 6, 16, 19, 10, 10, 21, 12, 18, 15, 13, 8, 18, 15, 19, 15, 13, 7, 24, 7, 13, 19, 16, 12, 18, 8, 17, 15, 20, 9, 24, 9, 13, 22, 17, 13, 22
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2000

Keywords

Crossrefs

bigomega(b^n-1): A046051 (b=2), A057958 (b=3), A057957 (b=4), A057956 (b=5), A057955 (b=6), A057954 (b=7), A057953 (b=8), this sequence (b=9), A057951 (b=10), A366682 (b=11), A366708 (b=12).

Programs

  • Mathematica
    PrimeOmega[Table[9^n - 1, {n, 1, 30}]] (* Amiram Eldar, Feb 02 2020 *)

Formula

Mobius transform of A085034. - T. D. Noe, Jun 19 2003
a(n) = A001222(A024101(n)) = A057958(2*n). - Amiram Eldar, Feb 02 2020
a(n) = A057941(n) + A057958(n). - Max Alekseyev, Jan 07 2024

A082830 Decimal expansion of Kempner series Sum_{k>=1, k has no digit 1 in base 10} 1/k.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Apr 14 2003

Keywords

Comments

Such sums are called Kempner series, see A082839 (the analog for digit 0) for more information. - M. F. Hasler, Jan 13 2020

Examples

			16.17696952812344426657...
		

References

  • Julian Havil, Gamma, Exploring Euler's Constant, Princeton University Press, Princeton and Oxford, 2003, page 34.

Crossrefs

Cf. A002387, A024101, A052383 (numbers without '1'), A011531 (numbers with '1').
Cf. A082831, A082832, A082833, A082834, A082835, A082836, A082837, A082838, A082839 (analog for digits 2, ..., 9 and 0).

Programs

  • Mathematica
    (* see the Mmca in Wolfram Library Archive. - Robert G. Wilson v, Jun 01 2009 *)

Formula

Equals Sum_{k in A052383\{0}} 1/k, where A052383 = numbers with no digit 1. Those which have a digit 1 (A011531) are omitted in the harmonic sum, and they have asymptotic density 1: almost all terms are omitted from the sum. - M. F. Hasler, Jan 15 2020

Extensions

More terms from Robert G. Wilson v, Jun 01 2009

A090739 Exponent of 2 in 9^n - 1.

Original entry on oeis.org

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

Views

Author

Labos Elemer and Ralf Stephan, Jan 19 2004

Keywords

Comments

The exponent of 2 in the factorization of Fibonacci(6n). - T. D. Noe, Mar 14 2014
Records of 3, 4, 5, 6, 7, 8,.. occur at n= 1, 2, 4, 8, 16, 32,... - R. J. Mathar, Jun 28 2025

Examples

			For n = 2, we see that -1 + 3^4 = 80 = 2^4 * 5 so a(2) = 4.
For n = 3, we see that -1 + 3^6 = 728 = 2^3 * 7 * 13, so a(3) = 3.
		

Crossrefs

Cf. A000005, A006519, A120738 (partial sums).
Appears in A161737.

Programs

  • Maple
    A090739 := proc(n)
        padic[ordp](9^n-1,2) ;
    end proc:
    seq(A090739(n),n=1..80) ; # R. J. Mathar, Jun 28 2025
  • Mathematica
    Table[Part[Flatten[FactorInteger[ -1+3^(2*n)]], 2], {n, 1, 70}]
    Table[IntegerExponent[Fibonacci[n], 2], {n, 6, 600, 6}] (* T. D. Noe, Mar 14 2014 *)
  • PARI
    a(n)=valuation(n,2)+3 \\ Charles R Greathouse IV, Mar 14 2014
    
  • Python
    def A090739(n): return (~n&n-1).bit_length()+3 # Chai Wah Wu, Jul 11 2022

Formula

a(n) = A007814(n) + 3.
a((2*n-1)*2^p) = p + 3, p >= 0. - Johannes W. Meijer, Feb 08 2013
a(n) = log_2(A006519(9^n - 1)). - Alonso del Arte, Feb 08 2013
a(n) = 2*tau(4*n)/(tau(4*n) - tau(n)), where tau(n) = A000005(n). - Peter Bala, Jan 06 2021
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, Nov 28 2022

Extensions

More terms from T. D. Noe, Mar 14 2014

A274909 Largest prime factor of 9^n - 1.

Original entry on oeis.org

2, 5, 13, 41, 61, 73, 1093, 193, 757, 1181, 3851, 6481, 797161, 16493, 4561, 21523361, 34511, 530713, 363889, 42521761, 368089, 570461, 23535794707, 6481, 22996651, 4795973261, 19927, 647753, 20381027, 47763361, 22434744889, 926510094425921, 2413941289
Offset: 1

Views

Author

Vincenzo Librandi, Jul 11 2016

Keywords

Examples

			9^4 - 1 = 6560 = 2^5*5*41, so a(4) = 41.
		

Crossrefs

Cf. similar sequences listed in A274906.

Programs

  • Magma
    [Maximum(PrimeDivisors(9^n-1)): n in [1..40]];
  • Mathematica
    Table[FactorInteger[9^n-1][[-1,1]],{n,40}]

Formula

a(n) = A006530(A024101(n)).
a(n) = A074477(2*n). - Amiram Eldar, Feb 02 2020
a(n) = max(A074476(n),A074477(n)). - Max Alekseyev, Apr 25 2022

Extensions

Terms to a(100) in b-file from Vincenzo Librandi, Jul 13 2016
a(101)-a(330) in b-file from Amiram Eldar, Feb 02 2020
a(331)-a(691) in b-file from Max Alekseyev, May 22 2022, Jul 25 2023

A366663 a(n) = phi(9^n-1), where phi is Euler's totient function (A000010).

Original entry on oeis.org

4, 32, 288, 2560, 26400, 165888, 2384928, 15728640, 141087744, 1246080000, 14758128000, 85996339200, 1270928131200, 8810420097024, 70207948800000, 677066362060800, 8218041445152000, 43129128265187328, 674757689572915200, 4238841176064000000
Offset: 1

Views

Author

Sean A. Irvine, Oct 15 2023

Keywords

Crossrefs

phi(k^n-1): A053287 (k=2), A295500 (k=3), A295501 (k=4), A295502 (k=5), A366623 (k=6), A366635 (k=7), A366654 (k=8), this sequence (k=9), A295503 (k=10), A366685 (k=11), A366711 (k=12).

Programs

  • Mathematica
    EulerPhi[9^Range[30] - 1]
  • PARI
    {a(n) = eulerphi(9^n-1)}

Formula

a(n) = A295500(2*n) = 2 * A295500(n) * A366579(n). - Max Alekseyev, Jan 07 2024

A052386 Number of integers from 1 to 10^n-1 that lack 0 as a digit.

Original entry on oeis.org

0, 9, 90, 819, 7380, 66429, 597870, 5380839, 48427560, 435848049, 3922632450, 35303692059, 317733228540, 2859599056869, 25736391511830, 231627523606479, 2084647712458320, 18761829412124889, 168856464709124010, 1519708182382116099, 13677373641439044900
Offset: 0

Views

Author

Odimar Fabeny, Mar 10 2000

Keywords

Examples

			For n=2, the numbers from 1 to 99 which *have* 0 as a digit are the 9 numbers 10, 20, 30, ..., 90. So a(1) = 99 - 9 = 90.
		

Crossrefs

Row n=9 of A228275.

Programs

Formula

a(n) = 9*a(n-1) + 9.
a(n) = 9*(9^n-1)/8 = sum_{j=1..n} 9^j = a(n-1)+9^n = 9*A002452(n) = A002452(n+1)-1; write A000918(n+1) in base 2 and read as if written in base 9. - Henry Bottomley, Aug 30 2001
a(n) = 10*a(n-1)-9*a(n-2). G.f.: 9*x / ((x-1)*(9*x-1)). - Colin Barker, Sep 26 2013

Extensions

More terms and revised description from James Sellers, Mar 13 2000
More terms and revised description from Robert G. Wilson v, Apr 14 2003
More terms from Colin Barker, Sep 26 2013
Showing 1-10 of 25 results. Next