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

A008776 Pisot sequences E(2,6), L(2,6), P(2,6), T(2,6).

Original entry on oeis.org

2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 1062882, 3188646, 9565938, 28697814, 86093442, 258280326, 774840978, 2324522934, 6973568802, 20920706406, 62762119218, 188286357654, 564859072962, 1694577218886, 5083731656658, 15251194969974
Offset: 0

Views

Author

Keywords

Comments

Definitions of Pisot and related sequences:
Pisot sequence E(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2) + 1/2) = nearest integer to a(n-1)^2/a(n-2), with 0 < x < y.
Pisot sequence L(x, y): a(0) = x, a(1) = y, a(n) = ceiling(a(n-1)^2/a(n-2)).
Pisot sequence P(x, y): a(0) = x, a(1) = y, a(n) = ceiling(a(n-1)^2/a(n-2) - 1/2).
Pisot sequence T(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2)).
Pisot/Shallit sequence S(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2)+1).
A025192 is the main entry for the sequence of numbers 2*3^n.
Number of tilings of a 4 X (4n+4) rectangle into T tetrominoes.
Numbers n such that 3^n = n/2 mod n. Cf. A066601 3^n mod n. - Zak Seidov, Aug 26 2006, Nov 20 2008
For n >= 1, a(n) is equal to the number of functions f:{1,2...,n}->{1,2,3} such that for a fixed x in {1,2,...,n} and a fixed y in {1,2,3} we have f(x) != y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
a(n+1) is the number of compositions of n when there are 2 types of each natural number. - Milan Janjic, Aug 13 2010
2*Sum_{n>=2} 1/A083667(n) = 2*Sum_{n>=2} 2^(-n)*3^(-((n*(n-1))/2)) = Sum_{n>=1} 1/Product_{k=1..n} A008776(k) = Sum_{n>=1} 1/Product_{k=1..n} 2*3^k = 0.17609845431233461692099660022134... . - Alexander R. Povolotsky, Aug 08 2011
Number of monic squarefree polynomials over F_3 of degree n+1. - Charles R Greathouse IV, Feb 07 2012
a(n) is the sum of the elements of the n-th power of the matrix {{1, 2}, {2, 1}}. - Griffin N. Macris, Mar 25 2016
Let D(m) denote the set of divisors of a number m, and consider s1(m) and s2(m) the sums of those divisors that are congruent to 1 and 2 (mod 3) respectively. This sequence lists the numbers m such that s1(m) = 1 and s2(m) = 2. - Michel Lagneau, Feb 09 2017
a(n) is the multiplicative order of k modulo 3^(n+1), where k is any number congruent to 2 or 5 modulo 9. Note that for n > 0, k is a primitive root modulo 3^(n+1) if and only if k == 2, 5 (mod 9). - Jianing Song, Apr 20 2021

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 203).

Crossrefs

Apart from initial term, same as A025192.
Cf. A080643.
Cf. A000244.

Programs

  • GAP
    List([0..30], n-> 2*3^n); # G. C. Greubel, Sep 11 2019
    
  • Haskell
    a008776 = (* 2) . (3 ^)
    a008776_list = iterate (* 3) 2  -- Reinhard Zumkeller, Oct 19 2015
    
  • Magma
    [2*3^n: n in [0..30]]; // G. C. Greubel, Sep 11 2019
    
  • Maple
    # E(x,y) is f(n,x,y,1/2), T(x,y) is f(n,x,y,0), and S(x,y) is f(n,x,y,1).
    f:=proc(n,x,y,r) option remember;
    if n=0 then x
    elif n=1 then y
    else floor(f(n-1,x,y,r)^2/f(n-2,x,y,r) + r); fi; end;
    [seq(f(n,2,6,1/2),n=0..30)];
    # N. J. A. Sloane, Jul 30 2016
  • Mathematica
    Table[EulerPhi[3^n], {n, 0, 100}] (* Artur Jasinski, Nov 19 2008 *)
    Table[MatrixPower[{{1,2},{1,2}},n][[1]][[2]],{n,0,44}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    NestList[3#&,2,50] (* Harvey P. Dale, Nov 28 2022 *)
  • PARI
    a(n)=3^n<<1 \\ corrected by Michel Marcus, Aug 03 2015
    
  • Python
    def A008776(n): return 3**n<<1 # Chai Wah Wu, Apr 02 2025
  • Sage
    [2*3^n for n in (0..30)] # G. C. Greubel, Sep 11 2019
    

Formula

a(n) = 2*3^n.
a(n) = 3*a(n-1).
G.f.: 2/(1-3*x). - Philippe Deléham, Oct 08 2007
a(n-1) = phi(3^n). - Artur Jasinski, Nov 19 2008
E.g.f.: 2*exp(3*x). - Mohammad K. Azarian, Jan 15 2009
From Paul Curtz, Jan 20 2009: (Start)
a(n) = A048473(n) + 1.
a(n) = A052919(n+1)-1.
a(n) = A115099(n) - 2.
a(n) = A100774(n) + 2. (End)
If p[i]=2, (i >= 1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i <= j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1)=det A. - Milan Janjic, Apr 29 2010
G.f.: ((1/2)/G(0)-1)/x^2 where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
G.f.: -G(0)/x where G(k) = 1 - 1/(1-2*x)/(1-x/(x-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 25 2013
G.f.: (1 - 1/Q(0))/x where Q(k) = 1 - x*(2*k-2)/(1 - x*(2*k+5)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 19 2013
G.f.: W(0), where W(k) = 1 + 1/(1 - x*(2*k+3)/(x*(2*k+4) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013

Extensions

Jasinski formula corrected by Charles R Greathouse IV, Feb 18 2011

A048899 One of the two successive approximations up to 5^n for 5-adic integer sqrt(-1).

Original entry on oeis.org

0, 3, 18, 68, 443, 1068, 1068, 32318, 110443, 1672943, 3626068, 23157318, 120813568, 1097376068, 1097376068, 19407922943, 49925501068, 355101282318, 355101282318, 15613890344818, 15613890344818, 110981321985443, 110981321985443, 9647724486047943, 9647724486047943
Offset: 0

Views

Author

Michael Somos, Jul 26 1999

Keywords

Comments

This is the root congruent to 3 (mod 5) for n>0.
The other case with the 2 (mod 5) numbers (except for n=0) is given in A048898. - Wolfdieter Lang, Feb 19 2016
From Jianing Song, Sep 06 2022: (Start)
For n > 0, a(n)-1 is one of the four solutions to x^4 == -4 (mod 5^n), the one that is congruent to 2 modulo 5.
For n > 0, a(n)+1 is one of the four solutions to x^4 == -4 (mod 5^n), the one that is congruent to 4 modulo 5. (End)

Examples

			a(2) = 18 because the two roots of x^2 + 1 == 0 (mod 5^2) are 7 and 18 and 18 == 3 (mod 5). For 7 see A048898(2).
		

References

  • J. H. Conway, The Sensual Quadratic Form, p. 118, Mathematical Association of America, 1997, The Carus Mathematical Monographs, Number 26.
  • K. Mahler, Introduction to p-Adic Numbers and Their Functions, Cambridge, 1973, p. 35.

Crossrefs

Programs

  • Magma
    [n le 2 select 3*(n-1) else Self(n-1)^5 mod 5^(n-1): n in [1..30]]; // Vincenzo Librandi, Feb 29 2016
  • Mathematica
    Join[{0}, RecurrenceTable[{a[1] == 3, a[n] == Mod[a[n-1]^5, 5^n]}, a, {n, 25}]] (* Vincenzo Librandi, Feb 29 2016 *)
  • PARI
    {a(n) = if( n<2, 3, a(n - 1)^5) % 5^n}
    
  • PARI
    a(n) = lift(-sqrt(-1 + O(5^n))); \\ Kevin Ryde, Dec 22 2020
    

Formula

a(n) = 5^n - A048898(n), n>=1.
a(n) = A066601(5^n), n>=0.
0 <= a(n) < 5^n. 5^n divides a(n)^2 + 1.
From Wolfdieter Lang, Apr 28 2012: (Start)
Recurrence: a(n) = a(n-1)^5 (mod 5^n), a(1) = 3, n>=2. See the Pari program below, and the J.- F. Alcover Mathematica program for A048898.
a(n) = 3^(5^(n-1)) (mod 5^n), n>=1. Compare with the above given formula involving A066601.
a(n)*a(n-1) + 1 == 0 (mod 5^(n-1)), n>=1.
(a(n)^2 + 1)/5^n = A210849(n), n>=0.
(End)
Another recurrence: a(n) = modp(a(n-1) + 4*(a(n-1)^2 + 1), 5^n), n >= 2, a(1) = 3. Here modp(a, m) is the representative from {0, 1, ... ,|m|-1} of the residue class a modulo m. Note that a(n) is in the residue class of a(n-1) modulo 5^(n-1) (see Hensel lifting). - Wolfdieter Lang, Feb 28 2016
a(n) == L(5^n,3) (mod 5^n), where L(n,x) denotes the n-th Lucas polynomial of A114525. - Peter Bala, Nov 20 2022

Extensions

Example corrected by Wolfdieter Lang, Apr 28 2012
Name clarified by Wolfdieter Lang, Feb 19 2016

A056969 a(n) = 10^n modulo n.

Original entry on oeis.org

0, 0, 1, 0, 0, 4, 3, 0, 1, 0, 10, 4, 10, 2, 10, 0, 10, 10, 10, 0, 13, 12, 10, 16, 0, 22, 1, 4, 10, 10, 10, 0, 10, 32, 5, 28, 10, 24, 25, 0, 10, 22, 10, 12, 10, 8, 10, 16, 31, 0, 31, 16, 10, 28, 10, 16, 31, 42, 10, 40, 10, 38, 55, 0, 30, 34, 10, 4, 34, 60, 10, 64, 10, 26, 25, 44, 54, 40
Offset: 1

Views

Author

Henry Bottomley, Jul 20 2000

Keywords

Examples

			a(7) = 3 since 10000000 = 7*1428571+3
		

Crossrefs

Cf. k^n mod n: A015910 (k=2), A066601 (k=3), A066602 (k=4), A066603 (k=5), A066604 (k=6), A066438 (k=7), A066439 (k=8), A066440 (k=9), this sequence (k=10), A066441 (k=11), A066442 (k=12), A116609 (k=13).

Programs

  • Maple
    seq(irem(10^n,n),n=1..78); # Zerinvary Lajos, Apr 20 2008
  • Mathematica
    Table[PowerMod[10, n, n], {n, 80} ]
  • PARI
    a(n) = lift(Mod(10, n)^n); \\ Michel Marcus, Oct 19 2017

Formula

a(n) = 10*A056968(n) mod n = A011557(n) mod n.

A066438 a(n) = 7^n mod n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 0, 1, 1, 9, 7, 1, 7, 7, 13, 1, 7, 1, 7, 1, 7, 5, 7, 1, 7, 23, 1, 21, 7, 19, 7, 1, 13, 15, 28, 1, 7, 11, 31, 1, 7, 7, 7, 25, 37, 3, 7, 1, 0, 49, 37, 9, 7, 1, 43, 49, 1, 49, 7, 1, 7, 49, 28, 1, 37, 37, 7, 21, 67, 49, 7, 1, 7, 49, 43, 45, 28, 25, 7, 1
Offset: 1

Views

Author

Robert G. Wilson v, Dec 27 2001

Keywords

Crossrefs

Cf. k^n mod n; A015910 (k=2), A066601 (k=3), A066602 (k=4), A066603 (k=5), A066604 (k=6), this sequence (k=7), A066439 (k=8), A066440 (k=9), A056969 (k=10), A066441 (k=11), A066442 (k=12), A116609 (k=13).

Programs

  • Maple
    seq(irem(7^n,n),n=1..80); # Zerinvary Lajos, Apr 20 2008
  • Mathematica
    Table[PowerMod[7, n, n], {n, 80} ]
  • PARI
    a(n) = { lift(Mod(7, n)^n) } \\ Harry J. Smith, Feb 14 2010

A092763 a(n) = floor(3^n / n).

Original entry on oeis.org

3, 4, 9, 20, 48, 121, 312, 820, 2187, 5904, 16104, 44286, 122640, 341640, 956593, 2690420, 7596480, 21523360, 61171656, 174339220, 498112057, 1426411800, 4093181688, 11767897353, 33891544377, 97764070320, 282429536481
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2004

Keywords

Comments

a(n) = (A000244(n) - A066601(n))/n.

Crossrefs

Cf. A000799.

Programs

A066603 a(n) = 5^n mod n.

Original entry on oeis.org

0, 1, 2, 1, 0, 1, 5, 1, 8, 5, 5, 1, 5, 11, 5, 1, 5, 1, 5, 5, 20, 3, 5, 1, 0, 25, 26, 9, 5, 25, 5, 1, 26, 25, 10, 1, 5, 25, 8, 25, 5, 1, 5, 9, 35, 25, 5, 1, 19, 25, 23, 1, 5, 1, 45, 25, 11, 25, 5, 25, 5, 25, 62, 1, 5, 49, 5, 13, 56, 65, 5, 1, 5, 25, 50, 17, 3, 25, 5, 65, 80, 25, 5, 1, 65
Offset: 1

Views

Author

Amarnath Murthy, Dec 22 2001

Keywords

Examples

			a(7) = 5 as 5^7 = 78125 = 7*11160 + 5.
		

Crossrefs

Cf. k^n mod n: A015910 (k=2), A066601 (k=3), A066602 (k=4), this sequence (k=5), A066604 (k=6), A066438 (k=7), A066439 (k=8), A066440 (k=9), A056969 (k=10), A066441 (k=11), A066442 (k=12), A116609 (k=13).

Programs

  • Maple
    seq(irem(5^n,n),n=1..85); # Zerinvary Lajos, Apr 20 2008
  • Mathematica
    Table[PowerMod[5, n, n], {n, 85} ]
  • PARI
    a(n) = { lift(Mod(5, n)^n) } \\ Harry J. Smith, Mar 09 2010

Extensions

More terms from Robert G. Wilson v, Dec 27 2001

A276740 Numbers n such that 3^n == 5 (mod n).

Original entry on oeis.org

1, 2, 4, 76, 418, 1102, 4687, 7637, 139183, 2543923, 1614895738, 9083990938, 23149317409, 497240757797, 4447730232523, 16000967516764, 65262766108619, 141644055557882
Offset: 1

Views

Author

Dmitry Ezhov, Sep 16 2016

Keywords

Comments

No other terms below 10^15. Some larger terms: 194995887252090239, 2185052151122686482926861593785262. - Max Alekseyev, Oct 13 2016

Examples

			3 == 5 (mod 1), so 1 is a term;
9 == 5 (mod 2), so 2 is a term.
		

Crossrefs

Cf. A066601.
Solutions to 3^n == k (mod n): A277340 (k=-11), A277289 (k=-7), A277288 (k=-5), A015973 (k=-2), A015949 (k=-1), A067945 (k=1), A276671 (k=2), this sequence (k=5), A277628 (k=6), A277126 (k=7), A277630 (k=8), A277274 (k=11).

Programs

  • Mathematica
    Select[Range[10^7], PowerMod[3, #, #] == Mod[5, #] &] (* Michael De Vlieger, Sep 26 2016 *)
  • PARI
    isok(n) = Mod(3, n)^n == Mod(5, n); \\ Michel Marcus, Sep 17 2016
    
  • Python
    A276740_list = [1,2,4]+[n for n in range(5,10**6) if pow(3,n,n) == 5] # Chai Wah Wu, Oct 04 2016

Extensions

a(11)-a(13) from Chai Wah Wu, Oct 05 2016
a(14) from Lars Blomberg, Oct 12 2016
a(15)-a(18) from Max Alekseyev, Oct 13 2016
a(12) was missing Robert G. Wilson v, Oct 19 2016

A066441 a(n) = 11^n mod n.

Original entry on oeis.org

0, 1, 2, 1, 1, 1, 4, 1, 8, 1, 0, 1, 11, 9, 11, 1, 11, 1, 11, 1, 8, 11, 11, 1, 1, 17, 26, 25, 11, 1, 11, 1, 11, 19, 16, 1, 11, 7, 5, 1, 11, 1, 11, 33, 26, 29, 11, 1, 18, 1, 5, 29, 11, 1, 11, 9, 20, 5, 11, 1, 11, 59, 8, 1, 46, 55, 11, 21, 20, 11, 11, 1, 11, 47, 26, 49, 44, 25, 11, 1
Offset: 1

Views

Author

Robert G. Wilson v, Dec 27 2001

Keywords

Crossrefs

Cf. k^n mod n: A015910 (k=2), A066601 (k=3), A066602 (k=4), A066603 (k=5), A066604 (k=6), A066438 (k=7), A066439 (k=8), A066440 (k=9), A056969 (k=10), this sequence (k=11), A066442 (k=12), A116609 (k=13).

Programs

  • Maple
    seq(irem(11^n,n),n=1..80); # Zerinvary Lajos, Apr 20 2008
  • Mathematica
    Table[PowerMod[11, n, n], {n, 80} ]
  • PARI
    a(n) = { lift(Mod(11, n)^n) } \\ Harry J. Smith, Feb 14 2010

A220235 a(n) = (2^n + 3^n) modulo n.

Original entry on oeis.org

0, 1, 2, 1, 0, 1, 5, 1, 8, 3, 5, 1, 5, 13, 5, 1, 5, 1, 5, 17, 14, 13, 5, 1, 0, 13, 26, 13, 5, 13, 5, 1, 2, 13, 30, 1, 5, 13, 35, 17, 5, 37, 5, 9, 35, 13, 5, 1, 12, 23, 35, 45, 5, 1, 0, 41, 35, 13, 5, 37, 5, 13, 35, 1, 15, 1, 5, 29, 35, 13, 5, 1, 5, 13, 50
Offset: 1

Views

Author

Zak Seidov, Dec 08 2012

Keywords

Comments

a(n) = (A015910(n) + A066601(n)) mod n.
a(n) = 0 at n = 1, 5, 25, 55, 125, 275, 605, 625, ... (A045576).

Crossrefs

Cf. A015910 (2^n mod n), A066601 (3^n mod n), A045576 (n|(2^n + 3^n)).

Programs

  • Mathematica
    Table[Mod[2^n + 3^n, n],{n,100}]

A297966 a(n) = 3^n mod prime(n).

Original entry on oeis.org

1, 0, 2, 4, 1, 1, 11, 6, 18, 5, 13, 10, 38, 36, 42, 15, 19, 34, 5, 32, 46, 51, 49, 39, 94, 30, 73, 53, 9, 91, 114, 100, 79, 121, 38, 127, 122, 113, 126, 138, 82, 114, 118, 112, 119, 10, 108, 30, 188, 20, 188, 30, 174, 169, 5, 52, 15, 241, 202, 222, 50, 267
Offset: 1

Views

Author

Vincenzo Librandi, Jan 11 2018

Keywords

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1500],IsPrime);;List([1..65],n->PowerModInt(3,n,P[n])); # Muniru A Asiru, Mar 12 2018
  • Magma
    [Modexp(3, n, NthPrime(n)): n in [1..80]];
    
  • Maple
    seq(3 &^ n mod ithprime(n), n=1..65); # Muniru A Asiru, Mar 12 2018
  • Mathematica
    Array[PowerMod[3, #, Prime@#]&, 80]
  • PARI
    a(n) = lift(Mod(3, prime(n))^n); \\ Michel Marcus, Jan 11 2018
    

Formula

a(n) = A000244(n) mod A000040(n).
Showing 1-10 of 13 results. Next