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 11-20 of 21 results. Next

A006565 Number of ways to color vertices of a hexagon using <= n colors, allowing only rotations.

Original entry on oeis.org

0, 1, 14, 130, 700, 2635, 7826, 19684, 43800, 88725, 166870, 295526, 498004, 804895, 1255450, 1899080, 2796976, 4023849, 5669790, 7842250, 10668140, 14296051, 18898594, 24674860, 31853000, 40692925, 51489126, 64573614
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    A006565 := n-> (n^6+n^3+2*n^2+2*n)/6.
    A006565:=-(1+7*z+53*z**2+49*z**3+10*z**4)/(z-1)**7; [Conjectured by Simon Plouffe in his 1992 dissertation.]

Formula

n*(n+1)*(n^2+n+1)*(n^2-2*n+2)/6.

A211450 (p-1)/x, where p = prime(n) and x = ord(5,p), the smallest positive integer such that 5^x == 1 mod p.

Original entry on oeis.org

1, 1, 0, 1, 2, 3, 1, 2, 1, 2, 10, 1, 2, 1, 1, 1, 2, 2, 3, 14, 1, 2, 1, 2, 1, 4, 1, 1, 4, 1, 3, 2, 1, 2, 4, 2, 1, 3, 1, 1, 2, 12, 10, 1, 1, 6, 6, 1, 1, 2, 1, 2, 6, 10, 1, 1, 4, 10, 1, 2, 1, 1, 1, 2, 39, 1, 2, 3, 1, 2, 1, 2, 3, 1, 18, 1, 4, 1, 16, 24, 2, 2, 2, 1
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 5; Table[If[Mod[nn, p] == 0, 0, (p-1)/MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]

A211449 (p-1)/x, where p = prime(n) and x = ord(4,p), the smallest positive integer such that 4^x == 1 mod p.

Original entry on oeis.org

0, 2, 2, 2, 2, 2, 4, 2, 2, 2, 6, 2, 4, 6, 2, 2, 2, 2, 2, 2, 8, 2, 2, 8, 4, 2, 2, 2, 6, 8, 18, 2, 4, 2, 2, 10, 6, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 6, 2, 6, 8, 2, 20, 10, 32, 2, 2, 2, 6, 8, 6, 2, 6, 2, 4, 2, 22, 16, 2, 2, 8, 2, 2, 2, 2, 2, 2, 18, 4, 4, 2, 2, 10, 12
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 4; Table[If[Mod[nn, p] == 0, 0, (p-1)/MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]

A211451 (p-1)/x, where p = prime(n) and x = ord(6,p), the smallest positive integer such that 6^x == 1 mod p.

Original entry on oeis.org

0, 0, 4, 3, 1, 1, 1, 2, 2, 2, 5, 9, 1, 14, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 8, 10, 1, 1, 1, 1, 1, 1, 1, 6, 4, 1, 1, 6, 2, 4, 1, 3, 10, 2, 14, 1, 2, 1, 1, 1, 1, 14, 12, 1, 1, 2, 2, 1, 1, 5, 2, 2, 6, 62, 6, 2, 2, 6, 1, 3, 11, 2, 1, 1, 6, 2, 4, 1, 1, 24, 1, 15, 10
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 6; Table[If[Mod[nn, p] == 0, 0, (p-1)/MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]

A211452 (p-1)/x, where p = prime(n) and x = ord(7,p), the smallest positive integer such that 7^x == 1 mod p.

Original entry on oeis.org

1, 2, 1, 0, 1, 1, 1, 6, 1, 4, 2, 4, 1, 7, 2, 2, 2, 1, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 4, 8, 1, 2, 2, 2, 2, 1, 3, 1, 2, 1, 1, 15, 19, 8, 2, 2, 1, 6, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 14, 2, 1, 2, 10, 3, 2, 3, 6, 1, 1, 11, 1, 6, 6, 1, 2, 4, 1, 2, 17, 22, 6, 1, 1, 6
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 7; Table[If[Mod[nn, p] == 0, 0, (p-1)/MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]

A211453 (p-1)/x, where p = prime(n) and x = ord(8,p), the smallest positive integer such that 8^x == 1 mod p.

Original entry on oeis.org

0, 1, 1, 6, 1, 3, 2, 3, 2, 1, 6, 3, 2, 3, 2, 1, 1, 3, 3, 2, 24, 6, 1, 8, 6, 1, 6, 1, 9, 4, 18, 1, 2, 3, 1, 30, 3, 3, 2, 1, 1, 3, 2, 6, 1, 6, 3, 6, 1, 3, 8, 2, 30, 5, 16, 2, 1, 6, 3, 4, 3, 1, 9, 2, 6, 1, 33, 48, 1, 3, 4, 2, 6, 3, 3, 2, 1, 9, 2, 6, 1, 3, 10, 18
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 8; Table[If[Mod[nn, p] == 0, 0, (p-1)/MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]

A211454 (p-1)/x, where p = prime(n) and x = ord(9,p), the smallest positive integer such that 9^x == 1 mod p.

Original entry on oeis.org

1, 0, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 10, 2, 2, 2, 2, 12, 6, 2, 12, 2, 2, 2, 4, 2, 6, 2, 4, 2, 2, 2, 2, 2, 2, 6, 4, 2, 2, 2, 2, 4, 2, 24, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 18, 4, 2, 2, 2, 18, 2, 8, 2, 2, 4, 2, 4, 2, 2, 6, 4, 2, 2, 2, 4, 2, 4, 2, 4, 10, 16
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 9; Table[If[Mod[nn, p] == 0, 0, (p-1)/MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]

A006559 Short period primes: the decimal expansion of 1/p has period less than p-1, but greater than zero.

Original entry on oeis.org

3, 11, 13, 31, 37, 41, 43, 53, 67, 71, 73, 79, 83, 89, 101, 103, 107, 127, 137, 139, 151, 157, 163, 173, 191, 197, 199, 211, 227, 239, 241, 251, 271, 277, 281, 283, 293, 307, 311, 317, 331, 347, 349, 353, 359, 373, 397, 401, 409, 421, 431, 439, 443, 449, 457
Offset: 1

Views

Author

Keywords

Comments

Primes 2 and 5 are excluded because 1/2 and 1/5 have no period. Also primes p whose multiplicative order mod p is less than p-1.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006883.

Programs

  • Mathematica
    Select[Prime[Range[100]], MultiplicativeOrder[10, #] < # - 1 &]
  • PARI
    a(n)=gcd(n,10)==1 && isprime(n) && znorder(Mod(10,n))Charles R Greathouse IV, Mar 15 2014
    
  • Python
    from itertools import islice
    from sympy import nextprime, n_order
    def A006559_gen(startvalue=1): # generator of terms >= startvalue
        p = max(startvalue-1,1)
        while (p:=nextprime(p)):
            if p!=2 and p!=5 and n_order(10,p)A006559_list = list(islice(A006559_gen(),20)) # Chai Wah Wu, Mar 03 2025

Extensions

More terms from James Sellers, Aug 21 2000

A060370 Ratios (p-1)/d, where p is a prime and d is the number of digits of the periodic part of the decimal expansion of 1/p.

Original entry on oeis.org

1, 2, 4, 1, 5, 2, 1, 1, 1, 1, 2, 12, 8, 2, 1, 4, 1, 1, 2, 2, 9, 6, 2, 2, 1, 25, 3, 2, 1, 1, 3, 1, 17, 3, 1, 2, 2, 2, 1, 4, 1, 1, 2, 1, 2, 2, 7, 1, 2, 1, 1, 34, 8, 5, 1, 1, 1, 54, 4, 10, 2, 2, 2, 2, 1, 4, 3, 1, 2, 3, 11, 2, 1, 2, 1, 1, 1, 4, 2, 2, 1, 3, 2, 1, 2
Offset: 1

Views

Author

Klaus Brockhaus, Apr 01 2001

Keywords

Comments

The sequence of 2nd, 4th and following terms coincides with A006556, which gives the "number of different cycles of digits in the decimal expansions of 1/p, 2/p, ..., (p-1)/p where p = n-th prime different from 2 or 5".

Examples

			a(13) = 40/5 = 8, since 41 is the 13th prime and the periodic part of 1/41 = 0.02439024390... consists of 5 digits.
		

Crossrefs

Programs

  • Mathematica
    Join[{1, 2, 4}, Table[p = Prime[n]; (p - 1)/Length[RealDigits[1/p, 10][[1, 1]]], {n, 4, 100}]] (* T. D. Noe, Oct 04 2012 *)
  • Python
    from sympy import prime, n_order
    def A060370(n): return 1 if n == 1 or n == 3 else n_order(10, prime(n))
    print([(prime(n)-1)//A060370(n) for n in range(1,86)]) # Karl-Heinz Hofmann, Mar 16 2022

Formula

a(n) = (b(n)-1)/c(n), where b(n) and c(n) are the n-th terms of A000040 and A048595 respectively.

A006596 Numbers k such that (2^(2k+1) - 2^(k+1) + 1)/5 is prime.

Original entry on oeis.org

2, 5, 6, 14, 21, 26, 141, 278, 281, 306, 345, 1365, 2573, 2661, 4766, 5385
Offset: 1

Views

Author

Keywords

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Mathematica
    For[ i=1, i<=10000, i++, If[ PrimeQ[ ( 2^(2n+1) - 2^(n+1) + 1)/5 ], Print[ n ] ] ]
    Select[Range[5400],PrimeQ[(2^(2#+1)-2^(#+1)+1)/5]&] (* Harvey P. Dale, Jun 28 2023 *)
  • PARI
    is(n)=ispseudoprime((2^(2*n+1) - 2^(n+1) + 1)/5) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

More terms from Douglas R. Burke (dburke(AT)nevada.edu)
Previous Showing 11-20 of 21 results. Next