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

A072872 a(n) is the smallest positive number k such that n divides 2^k - k.

Original entry on oeis.org

1, 2, 4, 4, 3, 4, 11, 8, 5, 14, 7, 4, 10, 16, 16, 16, 30, 16, 30, 16, 11, 58, 75, 16, 34, 10, 5, 16, 6, 16, 8, 32, 58, 30, 16, 16, 58, 30, 10, 16, 33, 16, 54, 92, 16, 118, 224, 16, 36, 34, 59, 16, 36, 34, 63, 16, 130, 6, 64, 16, 43, 8, 16, 64, 16, 58, 210, 84, 118, 16, 43, 16, 32
Offset: 1

Views

Author

Benoit Cloitre, Jul 28 2002

Keywords

Comments

If n is a power of 2, a(n) = n. Conjecture : if n > 47, a(n) < prime(n).

Crossrefs

See A135359 for another version.
Cf. A247248.

Programs

  • Mathematica
    dvkn[n_]:=Module[{k=1},While[!Divisible[2^k-k,n],k++];k]; Array[dvkn,80] (* Harvey P. Dale, Dec 23 2011 *)
  • PARI
    a(n) = for(k=1, oo, if(Mod(2, n)^k==k, return(k))); \\ Jinyuan Wang, Mar 15 2020

Extensions

Edited by N. J. A. Sloane, May 27 2010

A333334 a(n) is the smallest positive number k such that n divides 3^k + k.

Original entry on oeis.org

1, 1, 3, 1, 3, 3, 6, 5, 9, 3, 2, 9, 10, 15, 3, 13, 4, 9, 18, 17, 6, 29, 22, 21, 23, 17, 27, 25, 28, 3, 5, 13, 57, 23, 6, 9, 36, 23, 12, 37, 40, 15, 17, 29, 63, 63, 35, 45, 6, 23, 27, 17, 19, 27, 57, 109, 18, 31, 10, 57, 52, 5, 90, 45, 17, 57, 66, 65, 63, 23, 70
Offset: 1

Views

Author

Jinyuan Wang, Mar 15 2020

Keywords

Comments

For any positive integer n, if k = a(n) + n*m*A007734(n) and m >= 0 then 3^k + k is divisible by n.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, While[!Divisible[3^k + k, n], k++]; k]; Array[a, 100] (* Amiram Eldar, Mar 16 2020 *)
  • PARI
    a(n) = for(k=1, oo, if(Mod(3, n)^k==-k, return(k)));

Formula

a(3^m) = 3^m for m >= 0.
a(p) <= p - 1 if p is a prime greater than 3.

A333335 a(n) is the smallest positive number k such that n divides 4^k + k.

Original entry on oeis.org

1, 2, 2, 4, 1, 2, 5, 8, 2, 4, 10, 8, 4, 6, 11, 16, 13, 2, 12, 4, 5, 10, 22, 8, 21, 4, 11, 48, 28, 14, 30, 32, 17, 16, 31, 20, 7, 12, 29, 24, 40, 26, 42, 68, 11, 22, 44, 32, 5, 44, 86, 4, 52, 38, 51, 48, 59, 28, 50, 44, 60, 30, 47, 64, 4, 68, 3, 16, 158, 94, 70
Offset: 1

Views

Author

Jinyuan Wang, Apr 14 2020

Keywords

Crossrefs

Programs

  • PARI
    a(n) = for(k=1, oo, if(Mod(4, n)^k==-k, return(k)));

Formula

a(4^m) = 4^m for m >= 0.

A333336 a(n) is the smallest positive number k such that n divides 5^k + k.

Original entry on oeis.org

1, 1, 1, 3, 5, 1, 6, 3, 2, 5, 6, 7, 12, 11, 20, 3, 4, 13, 18, 15, 37, 61, 22, 19, 25, 21, 2, 11, 6, 25, 30, 3, 61, 7, 15, 31, 4, 53, 14, 35, 18, 37, 42, 79, 20, 29, 25, 19, 6, 25, 7, 31, 52, 31, 10, 11, 79, 139, 58, 55, 60, 123, 38, 3, 125, 61, 52, 7, 49, 15
Offset: 1

Views

Author

Jinyuan Wang, Apr 14 2020

Keywords

Comments

For any positive integer n, if k = a(n) + n*m*A007736(n) and m >= 0 then 5^k + k is divisible by n.

Crossrefs

Programs

  • PARI
    a(n) = for(k=1, oo, if(Mod(5, n)^k==-k, return(k)));

Formula

a(5^m) = 5^m for m >= 0.

A135366 a(n) is the smallest nonnegative k such that n divides 2^k + k.

Original entry on oeis.org

0, 2, 1, 4, 4, 2, 6, 8, 7, 4, 3, 8, 12, 6, 7, 16, 16, 14, 18, 4, 19, 8, 22, 8, 33, 12, 7, 40, 11, 26, 23, 32, 8, 16, 6, 32, 5, 18, 37, 24, 40, 38, 42, 8, 7, 22, 10, 32, 61, 84, 38, 12, 35, 32, 46, 40, 32, 28, 24, 44
Offset: 1

Views

Author

John L. Drost, Feb 16 2008

Keywords

Comments

a(2^m) = 2^m for m > 0. If p is an odd prime then by Fermat, a(p) <= p-1. 25 is the smallest n with a(n) > n.

Examples

			a(9)=7 since 2^7 + 7 = 9*15 and 2^k + k is not divisible by 9 for 0 <= k < 7.
		

Crossrefs

Programs

  • Mathematica
    sk[n_]:=Module[{k=0},While[!Divisible[2^k+k,n],k++];k]; Array[sk,60] (* Harvey P. Dale, Jun 01 2013 *)
  • PARI
    a(n) = for(m=0, oo, if(Mod(2, n)^m==-m, return(m))); \\ Jinyuan Wang, Mar 15 2020

Extensions

Corrected by Harvey P. Dale, Jun 01 2013
Showing 1-5 of 5 results.