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 21-30 of 31 results. Next

A296104 Numbers k such that 2^k == 3 (mod k-1).

Original entry on oeis.org

2, 111482, 465794, 79036178, 1781269903308, 250369632905748, 708229497085910, 15673900819204068
Offset: 1

Views

Author

Krzysztof Ziemak and Max Alekseyev, Dec 04 2017

Keywords

Comments

Also, numbers k such that 2^k - 2 is a Fermat pseudoprime, i.e., 2^k - 2 belongs to A015919 and A006935.
a(3) was found by McDaniel (1989).
Some larger terms (maybe not in order): 2338990834231272653582, 341569682872976768698011746141903924998969680638.
Discovered huge even PSP(2) numbers of the form 2*M(n), where n=p*q and M(n)=2^n-1, ensure that the following numbers are also even pseudoprimes of the form 2*M(p)*M(q): 2*M(37)*M(12589), 2*M(131)*M(17854891864360859951), 2*M(179)*M(1398713032993), 2*M(2111)*M(335494787819), 2*M(35267)*M(50508121). - Krzysztof Ziemak, Jan 01 2018

Crossrefs

Programs

  • Mathematica
    k = 2; lst = {2}; While[k < 1000000001, If[ PowerMod[2, k, k -1] == 3, AppendTo[lst, k]]; k += 10; If[ PowerMod[2, k, k -1] == 3, AppendTo[lst, k]]; k += 2]; lst (* Robert G. Wilson v, Jan 01 2018 *)
  • PARI
    is_A296104(n) = Mod(2, n-1)^n == 3; \\ Iain Fox, Dec 07 2017
  • Python
    A296104_list = [n for n in range(2,10**6) if pow(2,n,n-1) == 3 % (n-1)] # Chai Wah Wu, Dec 06 2017
    

Formula

a(n) = A296370(n) + 1.

A333269 Positive integers n such that 17^n == 2 (mod n).

Original entry on oeis.org

1, 3, 5, 3585, 4911, 5709, 1688565, 7361691, 16747709, 3226850283899, 8814126944005, 33226030397603
Offset: 1

Views

Author

Seiichi Manyama, Mar 14 2020

Keywords

Comments

No other terms below 10^16. Some larger term: 95549099691107109423357503242294996525424418266995858732192019626694044445113. - Max Alekseyev, Jan 09 2025

Crossrefs

Cf. Solutions to b^n == 2 (mod n): A015919 (b=2), A276671 (b=3), A130421 (b=4), A124246 (b=5), A277401 (b=7), A116622 (b=13), this sequence (b=17).

Programs

  • PARI
    for(k=1, 1e6, if(Mod(17, k)^k==2, print1(k", ")))
    
  • Python
    A333269_list = [n for n in range(1,10**6) if n == 1 or pow(17,n,n) == 2] # Chai Wah Wu, Mar 14 2020

Extensions

a(10)-a(12) from Max Alekseyev, Jan 09 2025

A067934 Let rep(k) = (10^k - 1)/9 be the k-th repunit number = 11111..1111 with k 1 digits, then sequence gives values of k such that rep(k) == 1 (mod k).

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 55, 59, 61, 67, 71, 73, 79, 83, 89, 91, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 259
Offset: 1

Views

Author

Benoit Cloitre, Mar 05 2002

Keywords

Comments

Due to Fermat's little theorem, all prime numbers except 3 are in the sequence. E.g., rep(17) = 1 + 17*653594771241830.
Numbers n such that 10^n == 10 (mod 9n). The number (10^n - 1)/9 is a term if and only if n is a term. - Thomas Ordowski, Apr 28 2018
Generally, the repunit theorem: Let integer b <> 1 and n be a positive integer. Define R_b(n) = (b^n-1)/(b-1) = N. Then R_b(N) == 1 (mod N) if and only if N == 1 (mod n). - Thomas Ordowski, Apr 28 2018
Proof: (b^N-1)/(b-1)-1 = (b^N-b)/(b-1) is divisible by N if and only if b^N-b is divisible by b^n-1. Since b^N-b == b^(N mod n)-b (mod b^n-1), we have that b^N-b is divisible by b^n-1 if and only if N == 1 (mod n). QED. - Max Alekseyev, Apr 28 2018
Terms which are not prime are 1 U A303608. - Robert G. Wilson v, Jun 13 2018
No multiples of 3 are in this sequence. - Eric Chen, Jun 13 2018
A005939 is subsequence. - Eric Chen, Jun 13 2018

Examples

			(10^11 - 1)/9 = 11111111111 == 1 (mod 11), so 11 is a term.
We also have the congruence 10^11 == 10 (mod 9*11).
		

Crossrefs

Programs

  • Mathematica
    {1}~Join~Select[Range[260], Mod[#2, #1] == 1 & @@ {#, (10^# - 1)/9} &] (* Michael De Vlieger, May 06 2018 *)
    fQ[n_] := PowerMod[10, n, 9 n] == 10; fQ[1] = True; Select[Range@260, fQ] (* Robert G. Wilson v, Jun 13 2018 *)
  • PARI
    is(n)=n==1 || ((10^n-1)/9)%n==1 \\ Eric Chen, Jun 13 2018

A216885 Primes p such that x^47 = 2 has a solution mod p.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Vincenzo Librandi, Sep 20 2012

Keywords

Comments

Complement of A059257 relative to A000040.
a(n) = A015919(n+1) up to n=60, and then both sequences start to differ substantially. [Bruno Berselli, Sep 20 2012]

Programs

  • Magma
    [p: p in PrimesUpTo(500) | exists(t){x: x in ResidueClassRing(p) | x^47 eq 2}];
  • Mathematica
    ok[p_] := Reduce[Mod[x^47 - 2, p] == 0, x, Integers] =!= False; Select[Prime[Range[100]], ok]

A235480 Primes whose base-3 representation is also the base-9 representation of a prime.

Original entry on oeis.org

2, 5, 7, 11, 17, 19, 23, 31, 37, 41, 43, 53, 67, 71, 73, 83, 89, 97, 103, 149, 157, 199, 239, 251, 257, 271, 277, 293, 307, 313, 331, 337, 359, 383, 397, 421, 431, 433, 499, 541, 557, 571, 587, 599, 601, 613, 631, 653, 659, 661, 683, 691, 709, 727, 751, 769, 823, 887, 911, 983, 1009, 1021, 1031, 1049, 1051, 1063, 1129, 1163, 1217
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
Appears to be a subsequence of A015919, A045344, A052085, A064555 and A143578.

Examples

			5 = 12_3 and 12_9 = 11 are both prime, so 5 is a term.
		

Crossrefs

Cf. A235265, A235473 - A235479, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ@ FromDigits[ IntegerDigits[#, 3], 9] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=9,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.

A165285 Primes which are the sum of at least 2 consecutive pars "Prime and PreviousNumber".

Original entry on oeis.org

17, 43, 59, 73, 79, 101, 109, 139, 163, 191, 197, 233, 239, 283, 317, 331, 379, 419, 433, 439, 443, 463, 467, 499, 521, 569, 571, 599, 617, 619, 641, 739, 743, 787, 811, 863, 911, 919, 941, 967, 971, 1021, 1039, 1061, 1063, 1087, 1097, 1109, 1117, 1229, 1289
Offset: 1

Views

Author

Keywords

Comments

(1+2)+(2+3)+(4+5)=17, (4+5)+(6+7)+(10+11)=43, (6+7)+(10+11)+(12+13)=59,..

Crossrefs

Programs

  • Mathematica
    lst={};Do[s=2*Prime[m]-1;Do[p=Prime[n];s+=(2*p-1);If[PrimeQ[s],If[s<=6793,AppendTo[lst,s]]],{n,m+1,3*5!}],{m,1,3*5!}];lst=Take[Union@lst,200]

A244149 a(n) = 2*(n*denominator(((n-1)*(n^2)+2^(n+1)-4)/(2*n))-n)/n+1.

Original entry on oeis.org

1, 1, 1, 3, 1, 5, 1, 7, 5, 9, 1, 11, 1, 13, 9, 15, 1, 17, 1, 19, 13, 21, 1, 23, 9, 25, 17, 3, 1, 29, 1, 31, 21, 33, 69, 35, 1, 37, 25, 39, 1, 41, 1, 43, 5, 45, 1, 47, 13, 49, 33, 51, 1, 53, 109, 55, 37, 57, 1, 59, 1, 61, 41, 63, 25, 65, 1, 67, 45, 9, 1, 71, 1, 73, 49, 75, 153, 77, 1, 79
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 01 2014

Keywords

Examples

			a(1) = 2*(1*denominator(((1-1)*(1^2)+2^(1+1)-4)/(2*1))-1)/1+1 = 1.
		

Crossrefs

Programs

  • Magma
    [2*(n*Denominator(((n-1)*(n^2)+2^(n+1)-4)/(2*n))-n)/n+1: n in [1..100]];
    
  • Mathematica
    A244149[n_] := 2*(n*Denominator[((n-1)*n^2 + 2^(n+1) - 4)/(2*n)] - n)/n + 1;
    Array[A244149, 100] (* Paolo Xausa, Jan 27 2025 *)
  • PARI
    a(n) = 2*(n*denominator(((n-1)*(n^2)+2^(n+1)-4)/(2*n))-n)/n + 1; \\ Michel Marcus, Sep 03 2014

A294646 a(n) = (1/2)^(2*n) mod (2*n+1).

Original entry on oeis.org

1, 1, 1, 7, 1, 1, 4, 1, 1, 16, 1, 11, 25, 1, 1, 25, 4, 1, 10, 1, 1, 16, 1, 36, 13, 1, 9, 43, 1, 1, 16, 61, 1, 52, 1, 1, 64, 60, 1, 79, 1, 16, 22, 1, 64, 70, 44, 1, 70, 1, 1, 16, 1, 1, 28, 1, 59, 16, 4, 67, 31, 11, 1, 97, 1, 106, 79, 1, 1, 106, 69, 136, 100, 1, 1, 52, 64, 1, 40, 32, 1, 31, 1, 131, 169
Offset: 1

Views

Author

Robert Israel and Thomas Ordowski, Nov 05 2017

Keywords

Comments

a(n) is the smallest k > 0 such that k*2^(2*n) == 1 (mod 2*n+1).
a(n)*A177023(n) == 1 (mod 2*n+1).
a(n)=1 iff 2*n+1 is in A015919.
1 <= a(n) <= 2*n, and is always coprime to 2*n+1.
Conjecture: a(n) is never 2 or 2*n or 2*n-2.
a(n) = 2*n-1 iff 2*n+1 is in A006521.

Examples

			For n = 3, 2*n+1 = 7, (1/2)^6 == 4^6 == 1 (mod 7) so a(3)=1.
		

Crossrefs

Programs

  • Maple
    seq((1/2 mod (2*n+1)) &^(2*n) mod (2*n+1), n=1..200);
  • PARI
    a(n) = (1/2)^(2*n) % (2*n+1); \\ Michel Marcus, Nov 06 2017

A296117 Base-2 pseudoprimes of the form 2*p*q where p and q are primes.

Original entry on oeis.org

161038, 49699666, 760569694, 4338249646, 357647681422, 547551530002, 3299605275646, 22999986587854, 42820164121582, 55173914702146, 69345154539266, 353190859033982
Offset: 1

Views

Author

Max Alekseyev, Dec 05 2017

Keywords

Comments

a(5) and a(10) are found by McDaniel (1989).
Terms in this sequence are of the form 2pq where p and q are distinct odd primes (A075819). - Charles R Greathouse IV, Dec 05 2017

Crossrefs

Subsequence of A006935 and hence of A015919.
The even terms of A215672.
Intersection of A006935 and A215672. - Felix Fröhlich, Dec 05 2017

Programs

  • PARI
    list(lim)=my(v=List(),pq); forprime(p=3,lim\6, forprime(q=3,min(lim\(2*p),p), pq=p*q; if(Mod(4,pq)^pq==2, listput(v,2*pq)))); Set(v) \\ Charles R Greathouse IV, Dec 05 2017

A333134 Positive integers k such that 11^k == 2 (mod k).

Original entry on oeis.org

1, 3, 413, 1329, 6587, 11629, 75761, 925071199, 9031140861789, 114876097917387, 1314252479257933
Offset: 1

Views

Author

Seiichi Manyama, Mar 20 2020

Keywords

Comments

No other terms below 10^16. Some larger terms: 1584680529929001639, 15598123298097725094806152851164088027801112472240274433891889912569153113. - Max Alekseyev, Jan 07 2025

Crossrefs

Solutions to b^n == 2 (mod n): A015919 (b=2), A276671 (b=3), A130421 (b=4), A124246 (b=5), A277401 (b=7), this sequence (b=11), A116622 (b=13), A333269 (b=17).
Cf. A015960.

Programs

  • PARI
    for(k=1, 1e6, if(Mod(11, k)^k==2, print1(k", ")))

Extensions

a(9)-a(11) from Max Alekseyev, Jan 07 2025
Previous Showing 21-30 of 31 results. Next