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.

Previous Showing 41-46 of 46 results.

A010886 Period 7: repeat [1, 2, 3, 4, 5, 6, 7].

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Partial sums are given by A130485(n)+n+1. - Hieronymus Fischer, Jun 08 2007
Decimal expansion of 1234567/9999999 = 0.123456712345671234567... - Eric Desbiaux, Nov 03 2008

Crossrefs

Cf. A177160 (decimal expansion of (4502+sqrt(29964677))/6961).

Programs

Formula

a(n) = 1 + (n mod 7). - Paolo P. Lava, Nov 21 2006
a(n) = A010876(n) + 1. G.f.: (Sum_{k=0..6} (k+1)*x^k)/(1-x^7). Also (7*x^8-8*x^7+1)/((1-x^7)*(1-x)^2). - Hieronymus Fischer, Jun 08 2007
From Wesley Ivan Hurt, Jul 18 2016: (Start)
a(n) = a(n-7) for n>6.
a(n) = 1 - 6*floor(n/7) + Sum_{k=1..6} floor((n + k)/7). (End)

A038122 Start with {1,2,...,n}, replace any two numbers a,b with |a^2-b^2|, repeat until single number k remains; a(n) = minimal value of k.

Original entry on oeis.org

1, 3, 0, 16, 15, 63, 8, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0
Offset: 1

Views

Author

Keywords

Comments

Due mostly to the efforts of Dean Hickerson, supported by David W. Wilson and Michael Kleber, it is now known that this has period 12 beginning at n=8.

Examples

			a(2) = 3 from (1,2); a(3) = 0 from ((1,2),3); a(4) = 16 from (((1,2),3),4); a(5) = 15 from ((((2,3),5),1),4)
a(6) = 63 from (((1,4),(3,5)),(2,6)) [ _Michael Kleber_ ]
a(7) = 8 from (((((4,5),6),(2,7)),1),3) [ Kleber ]
a(8) = 0 from ((((4,5),7)(2,6))((1,3),8)) [ Guy ]
a(9) = 3 from (2,(1,(((6,7),((3,4),8)),(5,9)))) [ Kleber ]
a(10)= 1 from ((((((((4,5),9),6),(8,10)),2),3),7),1) [ This and the following are due to _Dean Hickerson_ ]
a(11)= 0 from ((((((3,7),(9,11)),6),(8,10)),(1,2)),(4,5))
a(12)= 0 from ((((((1,3),7),(8,10)),(((5,6),9),(11,12))),2),4)
a(13)= 1 from (((((((((3,7),(9,11)),6),(8,10)),5),(12,13)),2),4),1) ...
		

Programs

  • Mathematica
    LinearRecurrence[{0,0,1,0,0,-1,0,0,1},{1,3,0,16,15,63,8,0,3,1,0,0,1,3,0,4},120] (* Harvey P. Dale, Jul 29 2015 *)
  • PARI
    a(n)=if(n<4||n>7, n*(n+1)/2%6, [16, 15, 63, 8][n-3]) \\ Charles R Greathouse IV, Feb 10 2017
    
  • Python
    def A038122(n): return (16,15,63,8)[n-4] if 3>1)%6 # Chai Wah Wu, Apr 17 2025

Formula

For n<4 and n>7, a(n) = n*(n+1)/2 mod 6 = A010875(A000217(n)). - Henry Bottomley, Feb 24 2003
a(n) = a(n-3)-a(n-6)+a(n-9) for n>16. - Colin Barker, Oct 01 2014
G.f.: x*(4*x^15 +60*x^14 +12*x^13 +8*x^12 -60*x^11 -12*x^10 -8*x^9 +60*x^8 +12*x^7 +7*x^6 -63*x^5 -12*x^4 -15*x^3 -3*x -1) / ((x -1)*(x^2 +1)*(x^2 +x +1)*(x^4 -x^2 +1)). - Colin Barker, Oct 01 2014

A070510 a(n) = n^3 mod 48.

Original entry on oeis.org

0, 1, 8, 27, 16, 29, 24, 7, 32, 9, 40, 35, 0, 37, 8, 15, 16, 17, 24, 43, 32, 45, 40, 23, 0, 25, 8, 3, 16, 5, 24, 31, 32, 33, 40, 11, 0, 13, 8, 39, 16, 41, 24, 19, 32, 21, 40, 47, 0, 1, 8, 27, 16, 29, 24, 7, 32, 9, 40, 35, 0, 37, 8, 15, 16, 17, 24, 43, 32, 45, 40, 23, 0, 25, 8, 3, 16, 5
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Programs

Formula

From G. C. Greubel, Apr 01 2016: (Start)
a(n) = a(n-48).
a(12*m) = 0.
a(2*n) = 8*A010875(n). (End)

A104686 a(n) = n*(n+1)/2 (mod 6).

Original entry on oeis.org

0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3
Offset: 0

Views

Author

Stuart M. Ellerstein (ellerstein(AT)aol.com), Apr 22 2005

Keywords

Programs

  • Mathematica
    Table[Mod[(n^2 + n)/2, 6], {n, 0, 100}] (* Arkadiusz Wesolowski, Nov 28 2011 *)
    Mod[Accumulate[Range[0,90]],6] (* or *) LinearRecurrence[{0,0,1,0,0,-1,0,0,1},{0,1,3,0,4,3,3,4,0},90] (* Harvey P. Dale, Aug 21 2022 *)

Formula

a(n) = A010875(A000217(n)). - Arkadiusz Wesolowski, Nov 28 2011
G.f.: -x*(1+3*x+3*x^3+3*x^5+x^6) / ( (x-1)*(1+x+x^2)*(x^2+1)*(x^4-x^2+1) ). - R. J. Mathar, Oct 16 2015

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

A126046 Exponents p of the Mersenne primes 2^p - 1 (see A000043) read mod 6.

Original entry on oeis.org

2, 3, 5, 1, 1, 5, 1, 1, 1, 5, 5, 1, 5, 1, 1, 1, 1, 1, 5, 1, 5, 5, 5, 5, 5, 1, 1, 5, 1, 1, 1, 5, 5, 1, 5, 5, 5, 5, 1, 1, 1, 5, 1, 5, 5, 1, 5, 5
Offset: 1

Views

Author

Artur Jasinski, Dec 17 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Mod[MersennePrimeExponent@ #, 6] &, 45] (* Michael De Vlieger, Apr 07 2018 *)

Formula

a(n) = A010875(A000043(n)). - Michel Marcus, Apr 07 2018

Extensions

a(45)-a(46) from Ivan Panchenko, Apr 07 2018
a(47) from Ivan Panchenko, Apr 09 2018
a(48) from Max Alekseyev, Sep 19 2023
Previous Showing 41-46 of 46 results.