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

A008960 Final digit of cubes: n^3 mod 10.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Decimal expansion of 208284810/1111111111. - Alexander R. Povolotsky, Mar 08 2013

Crossrefs

Cf. A167176.
Cf. A010879, A008959, A070514. - Doug Bell, Jun 15 2015

Programs

  • Magma
    [n^3 mod 10: n in [0..80]]; // Vincenzo Librandi, Mar 26 2013
    
  • Mathematica
    Table[Mod[n^3,10],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 8, 7, 4, 5, 6, 3, 2, 9},81] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    a(n)=n^3%10 \\ Charles R Greathouse IV, Mar 08 2013
    
  • PARI
    concat(0, Vec(x*(1+8*x+7*x^2+4*x^3+5*x^4+6*x^5+3*x^6+2*x^7+9*x^8) / ((1-x)*(1+x)*(1-x+x^2-x^3+x^4)*(1+x+x^2+x^3+x^4)) + O(x^100))) \\ Colin Barker, Nov 30 2015
  • Sage
    [power_mod(n,3,10 ) for n in range(0, 81)] # Zerinvary Lajos, Oct 29 2009
    

Formula

Periodic with period 10. - Franklin T. Adams-Watters, Mar 13 2006
a(n) = 4.5 -cos(Pi*n/5) +(1/2*(-(5-5^(1/2))^(1/2) +(5+5^(1/2))^(1/2))*2^(1/2))*sin(Pi*n/5) -cos(2*Pi*n/5) +(-1/10*(-(5-5^(1/2))^(1/2)+3*(5+5^(1/2))^(1/2))*2^(1/2))*sin(2*Pi*n/5) -cos(3*Pi*n/5) +(-1/2*((5-5^(1/2))^(1/2) +(5+5^(1/2))^(1/2))*2^(1/2))*sin(3*Pi*n/5) -cos(4*Pi*n/5) +( -1/10*(3*(5-5^(1/2))^(1/2) +(5 +5^(1/2))^(1/2))*2^(1/2))*sin(4*Pi*n/5) -0.5*(-1)^n. - Richard Choulet, Dec 12 2008
a(n) = n^k mod 10; for k > 0 where k mod 4 = 3. - Doug Bell, Jun 15 2015
G.f.: x*(1+8*x+7*x^2+4*x^3+5*x^4+6*x^5+3*x^6+2*x^7+9*x^8) / ((1-x)*(1+x)*(1-x+x^2-x^3+x^4)*(1+x+x^2+x^3+x^4)). - Colin Barker, Nov 30 2015

A070474 a(n) = n^3 mod 12, n^5 mod 12.

Original entry on oeis.org

0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

n^5 - n^3 == 0 (mod 12) is shown explicitly for n = 0 to 11, then the induction n -> n+12 for the 5th-order polynomial followed by binomial expansion of (n+12)^k concludes that the zero (mod 12) is periodically extended to the other integers. - R. J. Mathar, Jul 23 2009

Crossrefs

Cf. A167176.

Programs

Formula

From R. J. Mathar, Jul 23 2009: (Start)
a(n) = a(n-12).
G.f.: -x*(1 + 8*x + 3*x^2 + 4*x^3 + 5*x^4 + 7*x^6 + 8*x^7 + 9*x^8 + 4*x^9 + 11*x^10)/ ((x-1) *(1+x+x ^2) *(1+x) *(1-x+x^2) *(1+x^2) *(x^4-x^2+1)). (End)

A224484 Numbers which are the sum of two positive cubes and divisible by 3.

Original entry on oeis.org

9, 54, 72, 126, 189, 243, 351, 432, 468, 513, 576, 756, 855, 945, 1008, 1125, 1332, 1395, 1458, 1512, 1674, 1755, 1944, 2205, 2322, 2331, 2457, 2709, 2745, 2808, 3087, 3402, 3456, 3528, 3591, 3744, 4104, 4221, 4608, 4914, 4941
Offset: 1

Views

Author

Vincenzo Librandi, May 10 2013

Keywords

Comments

If 12*h-27 is a square then some values of 3*h are in this sequence. It is easy to verify that h is of the form 3*m^2-3*m+3, and therefore 9*(m^2-m+1) = (2-m)^3+(m+1)^3.
All entries are multiples of 9. [Proof: the cubes mod 3 are A010872. So the two cubes are either of the form (3i)^3 and (3j)^3 or (3i+1)^3 and (3j+2)^3. The same 3-periodic pattern is seen in the cubes modulo 9, A167176.] - R. J. Mathar, Aug 24 2016

Crossrefs

Cf. A224485 (divisible by k=5), A101421 (k=7), A101852 (k=11), A094447 (k=13), A099178 (k=17), A102619 (k=19), A101806 (k=23), A224483 (k=29), A102658 (k=31), A102618 (k=37).

Programs

  • Mathematica
    upto[n_] := Block[{t}, Union@ Reap[ Do[If[Mod[t = x^3 + y^3, 3] == 0, Sow@ t], {x, n^(1/3)}, {y, Min[x, (n - x^3)^(1/3)]}] ][[2, 1]]]; upto[5000] (* Giovanni Resta, Jun 12 2020 *)
    Module[{nn=20},Select[Union[Total/@Tuples[Range[nn]^3,2]],Mod[#,3]==0 && #Harvey P. Dale, Mar 06 2022 *)

A070473 a(n) = n^3 mod 11.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-11). - G. C. Greubel, Mar 26 2016

A282779 Period of cubes mod n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 3, 10, 11, 12, 13, 14, 15, 16, 17, 6, 19, 20, 21, 22, 23, 24, 25, 26, 9, 28, 29, 30, 31, 32, 33, 34, 35, 12, 37, 38, 39, 40, 41, 42, 43, 44, 15, 46, 47, 48, 49, 50, 51, 52, 53, 18, 55, 56, 57, 58, 59, 60, 61, 62, 21, 64, 65, 66, 67, 68, 69, 70, 71, 24, 73, 74, 75, 76, 77, 78, 79, 80, 27
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 21 2017

Keywords

Comments

The length of the period of A000035 (n=2), A010872 (n=3), A109718 (n=4), A070471 (n=5), A010875 (n=6), A070472 (n=7), A109753 (n=8), A167176 (n=9), A008960 (n = 10), etc. (see also comment in A000578 from R. J. Mathar).
Conjecture: let a_p(n) be the length of the period of the sequence k^p mod n where p is a prime, then a_p(n) = n/p if n == 0 (mod p^2) else a_p(n) = n.
For example: sequence k^7 mod 98 gives 1, 30, 31, 18, 19, 48, 49, 50, 79, 80, 67, 68, 97, 0, 1, 30, 31, 18, 19, 48, 49, 50, 79, 80, 67, 68, 97, 0, ... (period 14), 7 is a prime, 98 == 0 (mod 7^2) and 98/7 = 14.

Examples

			a(9) = 3 because reading 1, 8, 27, 64, 125, 216, 343, 512, ... modulo 9 gives 1, 8, 0, 1, 8, 0, 1, 8, 0, ... with period length 3.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := For[k = 1, True, k++, If[Mod[k^3, n] == 0 && Mod[(k + 1)^3 , n] == 1, Return[k]]]; Table[a[n], {n, 1, 81}]

Formula

Apparently: a(n) = 2*a(n-9) - a(n-18).
Empirical g.f.: x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 3*x^8 + 8*x^9 + 7*x^10 + 6*x^11 + 5*x^12 + 4*x^13 + 3*x^14 + 2*x^15 + x^16) / ((1 - x)^2*(1 + x + x^2)^2*(1 + x^3 + x^6)^2). - Colin Barker, Feb 21 2017

A337596 Largest m such that k^n (mod m) is always either 0, +1, or -1.

Original entry on oeis.org

3, 5, 9, 16, 11, 13, 4, 32, 27, 25, 23, 16, 4, 29, 31, 64, 4, 37, 4, 41, 49, 23, 47, 32, 11, 53, 81, 29, 59, 61, 4, 128, 67, 8, 71, 73, 4, 8, 79, 41, 83, 49, 4, 89, 31, 47, 4, 97, 4, 125, 103, 53, 107, 109, 121, 113, 9, 59, 4, 61, 4, 8, 127, 256, 131, 67, 4, 137
Offset: 1

Views

Author

Elliott Line, Sep 02 2020

Keywords

Comments

For a given n, for all k, k^n mod a(n) will always be either 0, 1 or a(n)-1. This will not be true for numbers larger than a(n).
It appears that a(m) = 4 for m in A045979. - Michel Marcus, Sep 04 2020

Examples

			For n = 5 all fifth powers of natural numbers: 1,32,243,1024, etc. are either a multiple of 11, or 1 greater or 1 less than a multiple of 11. There is no greater number than 11 for which all fifth powers are at most 1 different from a multiple. So a(5) = 11.
		

Crossrefs

Cf. residues: A096008 (for n=2), A096087 (for n=3).

Extensions

More terms from Michel Marcus, Sep 04 2020
Showing 1-6 of 6 results.