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

A000689 Final decimal digit of 2^n.

Original entry on oeis.org

1, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6
Offset: 0

Views

Author

Keywords

Comments

These are the analogs of the powers of 2 in carryless arithmetic mod 10.
Let G = {2,4,8,6}. Let o be defined as XoY = least significant digit in XY. Then (G,o) is an Abelian group wherein 2 is a generator (also see the first comment under A001148). - K.V.Iyer, Mar 12 2010
This is also the decimal expansion of 227/1818. - Kritsada Moomuang, Dec 21 2021

Examples

			G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 6*x^4 + 2*x^5 + 4*x^6 + 8*x^7 + 6*x^8 + ...
		

Crossrefs

Programs

  • Haskell
    a000689 n = a000689_list !! n
    a000689_list = 1 : cycle [2,4,8,6]  -- Reinhard Zumkeller, Sep 15 2011
  • Magma
    [2^n mod 10: n in [0..150]]; // Vincenzo Librandi, Apr 12 2011
    
  • Mathematica
    Table[PowerMod[2, n, 10], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
  • PARI
    for(n=0,80, if(n,{x=(n+3)%4+1; print1(10-(4*x^3+47*x-27*x^2)/3,", ")},{print1("1, ")}))
    
  • SageMath
    [power_mod(2,n,10)for n in range(0, 81)] # Zerinvary Lajos, Nov 03 2009
    

Formula

Periodic with period 4.
a(n) = 2^n mod 10.
a(n) = A002081(n) - A002081(n-1), for n > 0.
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3), n > 3.
G.f.: (x+3*x^2+5*x^3+1)/((1-x) * (1+x^2)). (End)
For n >= 1, a(n) = 10 - (4x^3 + 47x - 27x^2)/3, where x = (n+3) mod 4 + 1.
For n >= 1, a(n) = A070402(n) + 5*floor( ((n-1) mod 4)/2 ).
G.f.: 1 / (1 - 2*x / (1 + 5*x^3 / (1 + x / (1 - 3*x / (1 + 3*x))))). - Michael Somos, May 12 2012
a(n) = 5 + cos((n*Pi)/2) - 3*sin((n*Pi)/2) for n >= 1. - Kritsada Moomuang, Dec 21 2021

A216099 Period of powers of 3 mod 10^n.

Original entry on oeis.org

4, 20, 100, 500, 5000, 50000, 500000, 5000000, 50000000, 500000000, 5000000000, 50000000000, 500000000000, 5000000000000, 50000000000000, 500000000000000, 5000000000000000, 50000000000000000, 500000000000000000
Offset: 1

Views

Author

V. Raman, Sep 01 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[n<5,(4*5^n)/5,10^n/20],{n,20}] (* or *) Join[{4,20,100},NestList[ 10#&,500,20]] (* Harvey P. Dale, May 31 2017 *)
  • PARI
    a(n)=if(n<5,4*5^n/5,10^n/20) \\ Charles R Greathouse IV, Mar 26 2016

Formula

a(n) = 4*5^(n-1) for n <= 4.
a(n) = 5*10^(n-2) for n >= 5.

A281181 E.g.f. C(x) satisfies: C(x) = cosh( Integral C(x)^3 dx ).

Original entry on oeis.org

1, 1, 13, 493, 37369, 4732249, 901188997, 240798388357, 85948640603761, 39504564917358001, 22726779729476308093, 15998009117983994065693, 13526765851190230940840809, 13528070218935445806530640649, 15795819619923464298050697616117, 21294937666865806704402646632389557, 32828500597549179599563478551377297121, 57385924456400269824204023290894357442401, 112904615348383588847189789579363784912180973
Offset: 0

Views

Author

Paul D. Hanna, Jan 16 2017

Keywords

Comments

From Paul Curtz, Jan 20 2017: (Start)
a(n) mod 10 = periodic sequence of length 8: repeat [1, 1, 3, 3, 9, 9, 7, 7] = duplicated A001148(n).
a(n) mod 9 = 1, followed by period 3: repeat [1, 4, 7]. See A100402. See also A281280, A281182, A281183, A281184 (1, followed by 3's).
a(n+p) - a(n) is a multiple of 12. (End)

Examples

			E.g.f.: C(x) = 1 + x^2/2! + 13*x^4/4! + 493*x^6/6! + 37369*x^8/8! + 4732249*x^10/10! + 901188997*x^12/12! + 240798388357*x^14/14! + 85948640603761*x^16/16! + 39504564917358001*x^18/18! + 22726779729476308093*x^20/20! +...
such that
(1) C(x) = cosh( Integral C(x)^3 dx ),
(2) C(x)^2 - S(x)^2 = 1, and
(3) C(x) = 1 + Integral C(x)^3*S(x) dx,
where S(x) begins:
S(x) = x + 4*x^3/3! + 88*x^5/5! + 4672*x^7/7! + 454144*x^9/9! + 70084096*x^11/11! + 15728822272*x^13/13! + 4836914249728*x^15/15! + 1952137912385536*x^17/17! + 1000749157519458304*x^19/19! + 635146072839001735168*x^21/21! +...+ A281180(n)*x^(2*n-1)/(2*n-1)! +...
RELATED SERIES.
As power series with reduced fractional coefficients, S(x) and C(x) begin:
S(x) = x + 2/3*x^3 + 11/15*x^5 + 292/315*x^7 + 3548/2835*x^9 + 273766/155925*x^11 + 15360178/6081075*x^13 + 214706776/58046625*x^15 +...
C(x) = 1 + 1/2*x^2 + 13/24*x^4 + 493/720*x^6 + 37369/40320*x^8 + 4732249/3628800*x^10 + 901188997/479001600*x^12 + 240798388357/87178291200*x^14 +...
Related powers of series C(x) are given as follows.
C(x)^2 = 1 + 2*x^2/2! + 32*x^4/4! + 1376*x^6/6! + 114176*x^8/8! + 15519488*x^10/10! + 3132551168*x^12/12! + 879422726144*x^14/14! + 327670676455424*x^16/16! + 156439068819587072*x^18/18! +...+ A281183(n)*x^(2*n)/(2*n)! +...
where C(x)^2 = 1 + S(x)^2.
C(x)^3 = 1 + 3*x^2/2! + 57*x^4/4! + 2739*x^6/6! + 246801*x^8/8! + 35822307*x^10/10! + 7636142793*x^12/12! + 2246286827091*x^14/14! + 871869519033249*x^16/16! + 431649452286233283*x^18/18! +...+ A281184(n)*x^(2*n)/(2*n)! +...
where C(x)^3 = d/dx log( C(x) + S(x) ).
Also, C(x)^3 = d/dx Series_Reversion( Integral 1/cosh(x)^3 dx ).
C(x)^4 = 1 + 4*x^2/2! + 88*x^4/4! + 4672*x^6/6! + 454144*x^8/8! + 70084096*x^10/10! + 15728822272*x^12/12! + 4836914249728*x^14/14! + 1952137912385536*x^16/16! + 1000749157519458304*x^18/18! +...+ A281180(n+1)*x^(2*n)/(2*n)! +...
where C(x)^4 = d/dx S(x).
		

Crossrefs

Cf. A281180 (S), A281182 (C+S), A281183 (C^2), A281184 (C^3), A001148, A100402, A122553.

Programs

  • Mathematica
    nMax = 30; m = maxExponent = 2*nMax; a[n_] := Module[{S = x, C = 1}, For[i = 1, i <= n, i++, S = Integrate[C^4 + x*O[x]^m // Normal, x] + O[x]^m // Normal; C = 1 + Integrate[S*C^3 + O[x]^m // Normal, x]] + O[x]^m // Normal; (2*n)!*Coefficient[C, x, 2*n]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, nMax}] (* Jean-François Alcover, Jan 20 2017, adapted from PARI *)
    nmax = 20; Table[(CoefficientList[Sqrt[D[InverseSeries[Series[(2*x + Sin[2*x])/4, {x, 0, 2*nmax - 1}], x], x]], x] * Range[0, 2*nmax - 2]!)[[2*n - 1]], {n, 1, nmax}] (* Vaclav Kotesovec, Sep 02 2017 *)
  • PARI
    {a(n) = my(S=x,C=1); for(i=0,n, S = intformal( C^4 +x*O(x^(2*n))); C = 1 + intformal( S*C^3 ) ); (2*n)!*polcoeff(C,2*n)}
    for(n=0,30,print1(a(n),", "))

Formula

E.g.f. C(x) = d/dx Series_Reversion( Integral sqrt(1 - x^2) dx ).
E.g.f. C(x) = d/dx Series_Reversion( ( x*sqrt(1 - x^2) + asin(x) )/2 ).
E.g.f. C(x) = ( d/dx Series_Reversion( Integral cos(x)^2 dx ) )^(1/2).
E.g.f. C(x) = ( d/dx Series_Reversion( (2*x + sin(2*x))/4 ) )^(1/2).
E.g.f. C(x) = ( d/dx Series_Reversion( Integral 1/cosh(x)^3 dx ) )^(1/3).
E.g.f. C(x) = ( d/dx Series_Reversion( ( sinh(x)/cosh(x)^2 + atan(sinh(x)) )/2 ) )^(1/3).
E.g.f. C(x) and related series S(x) (e.g.f. of A281180) satisfy:
(1.a) C(x)^2 - S(x)^2 = 1.
(1.b) C(x)^2 + S(x)^2 = 1 + Integral 4*C(x)^4*S(x) dx.
Integrals.
(2.a) S(x) = Integral C(x)^4 dx.
(2.b) C(x) = 1 + Integral C(x)^3*S(x) dx.
Exponential.
(3.a) C(x) + S(x) = exp( Integral C(x)^3 dx ).
(3.b) C(x) = cosh( Integral C(x)^3 dx ).
(3.c) S(x) = sinh( Integral C(x)^3 dx ).
Derivatives.
(4.a) S'(x) = C(x)^4.
(4.b) C'(x) = C(x)^3*S(x).
(4.c) (C'(x) + S'(x))/(C(x) + S(x)) = C(x)^3.
(4.d) (C(x)^2 + S(x)^2)' = 4*C(x)^4*S(x).
Explicit Solutions.
(5.a) S(x) = Series_Reversion( Integral 1/(1 + x^2)^2 dx ).
(5.b) C(x) = d/dx Series_Reversion( Integral sqrt(1 - x^2) dx ).
(5.c) C(x) + S(x) = exp( Series_Reversion( Integral 1/cosh(x)^3 dx ) ).
(5.d) C(x)^2 = d/dx Series_Reversion( Integral cos(x)^2 dx ).
(5.e) C(x)^3 = d/dx Series_Reversion( Integral 1/cosh(x)^3 dx ).
(5.f) C(x)^4 = d/dx Series_Reversion( Integral 1/(1 + x^2)^2 dx ).
(5.g) C(x)^5 = d/dx Series_Reversion( Integral C(i*x)^5 dx ).

Extensions

Name simplified by Paul D. Hanna, Jan 22 2017

A001903 Final digit of 7^n.

Original entry on oeis.org

1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1, 7, 9, 3, 1
Offset: 0

Views

Author

Keywords

Comments

Period 4: repeat [1, 7, 9, 3]. - Joerg Arndt, Aug 12 2014

Crossrefs

Programs

Formula

a(n) = 7^n mod 10. - Zerinvary Lajos, Nov 03 2009
From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 2.
G.f.: ( 1+6*x+3*x^2 ) / ( (1-x)*(1+x^2) ). (End)
a(n) = 10 - a(n-2) for n > 1. - Vincenzo Librandi, Feb 08 2011
From Bruno Berselli, Feb 08 2011: (Start)
a(n) = 5 - (2-i)*(-i)^n - (2+i)*i^n, where i=sqrt(-1).
a(n) = A001148(A159966(n)). (End)
a(n) = A010879(A000420(n)). - Michel Marcus, Jul 06 2016
E.g.f.: 2*sin(x) - 4*cos(x) + 5*exp(x). - Ilya Gutkovskiy, Jul 06 2016

A001218 a(n) = 3^n mod 100.

Original entry on oeis.org

1, 3, 9, 27, 81, 43, 29, 87, 61, 83, 49, 47, 41, 23, 69, 7, 21, 63, 89, 67, 1, 3, 9, 27, 81, 43, 29, 87, 61, 83, 49, 47, 41, 23, 69, 7, 21, 63, 89, 67, 1, 3, 9, 27, 81, 43, 29, 87, 61, 83, 49, 47, 41, 23, 69, 7, 21, 63, 89, 67
Offset: 0

Views

Author

Keywords

Comments

Period is 20.

Crossrefs

Cf. A001148, A216096, A216097. - Zak Seidov, Jul 27 2014

Programs

Extensions

Definition corrected by Zak Seidov, Jul 27 2014

A216096 a(n) = 3^n mod 1000.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 187, 561, 683, 49, 147, 441, 323, 969, 907, 721, 163, 489, 467, 401, 203, 609, 827, 481, 443, 329, 987, 961, 883, 649, 947, 841, 523, 569, 707, 121, 363, 89, 267, 801, 403, 209, 627, 881, 643, 929, 787, 361, 83, 249, 747, 241, 723, 169, 507, 521, 563, 689
Offset: 0

Views

Author

V. Raman, Sep 01 2012

Keywords

Comments

Period = 100.

Crossrefs

Programs

Extensions

Definition corrected by Zak Seidov, Jul 27 2014
Offset changed and a(0) = 1 prepended by Vincenzo Librandi, Aug 16 2016

A216097 3^n mod 10000.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 9683, 9049, 7147, 1441, 4323, 2969, 8907, 6721, 163, 489, 1467, 4401, 3203, 9609, 8827, 6481, 9443, 8329, 4987, 4961, 4883, 4649, 3947, 1841, 5523, 6569, 9707, 9121, 7363, 2089, 6267, 8801, 6403, 9209, 7627, 2881, 8643, 5929, 7787, 3361, 83, 249, 747
Offset: 0

Views

Author

V. Raman, Sep 01 2012

Keywords

Comments

Period = 500.

Crossrefs

Programs

  • Magma
    [Modexp(3, n, 10000): n in [0..110]]; // Vincenzo Librandi, Aug 16 2016
  • Mathematica
    PowerMod[3,Range[0,60],10000] (* Harvey P. Dale, Oct 18 2015 *)
  • PARI
    for(i=0, 100, print(3^i%10000" "))
    

Extensions

Definition corrected by Zak Seidov, Jul 27 2014
a(0) = 1, offset changed by Vincenzo Librandi, Aug 16 2016

A168427 a(n) = 3^n mod 30.

Original entry on oeis.org

1, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27, 21, 3, 9, 27
Offset: 0

Views

Author

Zerinvary Lajos, Nov 25 2009

Keywords

Crossrefs

Cf. A001148.

Programs

  • Mathematica
    PowerMod[3,Range[0,90],30] (* Harvey P. Dale, Nov 04 2011 *)
  • PARI
    a(n)=lift(Mod(3,30)^n) \\ Charles R Greathouse IV, Mar 22 2016
    
  • Python
    def A168427(n): return (21,3,9,27)[n&3] if n else 1 # Chai Wah Wu, Jan 22 2023
  • Sage
    [power_mod(3,n,30) for n in range(0, 88)] #
    

Formula

From Chai Wah Wu, Jan 22 2023: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 3.
G.f.: (-20*x^3 - 7*x^2 - 2*x - 1)/((x - 1)*(x^2 + 1)). (End)

A361390 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where T(n,k) is carryless n^k base 10.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 9, 4, 1, 0, 1, 6, 7, 6, 5, 1, 0, 1, 2, 1, 4, 5, 6, 1, 0, 1, 4, 3, 6, 5, 6, 7, 1, 0, 1, 8, 9, 4, 5, 6, 9, 8, 1, 0, 1, 6, 7, 6, 5, 6, 3, 4, 9, 1, 0, 1, 2, 1, 4, 5, 6, 1, 2, 1, 10, 1, 0, 1, 4, 3, 6, 5, 6, 7, 6, 9, 100, 11, 1, 0, 1, 8, 9, 4, 5, 6, 9, 8, 1, 1000, 121, 12, 1
Offset: 0

Views

Author

Seiichi Manyama, Mar 10 2023

Keywords

Examples

			4 * 4 = 16, so T(4,2) = 6. 6 * 4 = 24, so T(4,3) = 4.
Square array begins:
  1, 0, 0, 0, 0, 0, 0, 0, ...
  1, 1, 1, 1, 1, 1, 1, 1, ...
  1, 2, 4, 8, 6, 2, 4, 8, ...
  1, 3, 9, 7, 1, 3, 9, 7, ...
  1, 4, 6, 4, 6, 4, 6, 4, ...
  1, 5, 5, 5, 5, 5, 5, 5, ...
  1, 6, 6, 6, 6, 6, 6, 6, ...
  1, 7, 9, 3, 1, 7, 9, 3, ...
		

Crossrefs

Columns k=0..4 give A000012, A001477, A059729, A169885, A169886.
Rows n=0..4 give A000007, A000012, A000689, A001148, A168428.
T(11,k) gives A059734.
Main diagonal gives A361351.

Programs

  • PARI
    T(n, k) = fromdigits(Vec(Pol(digits(n))^k)%10);
Showing 1-9 of 9 results.