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.

A006521 Numbers n such that n divides 2^n + 1.

Original entry on oeis.org

1, 3, 9, 27, 81, 171, 243, 513, 729, 1539, 2187, 3249, 4617, 6561, 9747, 13203, 13851, 19683, 29241, 39609, 41553, 59049, 61731, 87723, 97641, 118827, 124659, 177147, 185193, 250857, 263169, 292923, 354537, 356481, 373977, 531441, 555579, 752571
Offset: 1

Views

Author

Keywords

Comments

Closed under multiplication: if x and y are terms then so is x*y.
More is true: 1. If n is in the sequence then so is any multiple of n having the same prime factors as n. 2. If n and m are in the sequence then so is lcm(n,m). For a proof see the Bailey-Smyth reference. Elements of the sequence that cannot be generated from smaller elements of the sequence using either of these rules are called *primitive*. The sequence of primitive solutions of n|2^n+1 is A136473. 3. The sequence satisfies various congruences, which enable it to be generated quickly. For instance, every element of this sequence not a power of 3 is divisible either by 171 or 243 or 13203 or 2354697 or 10970073 or 22032887841. See the Bailey-Smyth reference. - Toby Bailey and Christopher J. Smyth, Jan 13 2008
A000051(a(n)) mod a(n) = 0. - Reinhard Zumkeller, Jul 17 2014
The number of terms < 10^n: 3, 5, 9, 15, 25, 40, 68, 114, 188, 309, 518, 851, .... - Robert G. Wilson v, May 03 2015
Also known as Novák numbers after Břetislav Novák who was apparently the first to study this sequence. - Charles R Greathouse IV, Nov 03 2016
Conjecture: if n divides 2^n+1, then (2^n+1)/n is squarefree. Cf. A272361. - Thomas Ordowski, Dec 13 2018
Conjecture: For k > 1, k^m == 1 - k (mod m) has an infinite number of positive solutions. - Juri-Stepan Gerasimov, Sep 29 2019

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 243, p. 68, Ellipses, Paris 2008.
  • R. Honsberger, Mathematical Gems, M.A.A., 1973, p. 142.
  • W. Sierpiński, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #16.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A014945.
Cf. A057719 (prime factors), A136473 (primitive n such that n divides 2^n+1).
Cf. A066807 (the corresponding quotients).
Solutions to k^m == k-1 (mod m): 1 (k = 1), this sequence (k = 2), A015973 (k = 3), A327840 (k = 4), A123047 (k = 5), A327943 (k = 6), A328033 (k = 7).
Column k=2 of A333429.

Programs

  • Haskell
    a006521 n = a006521_list !! (n-1)
    a006521_list = filter (\x -> a000051 x `mod` x == 0) [1..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..6*10^5] | (2^n+1) mod n eq 0 ]; // Vincenzo Librandi, Dec 14 2018
  • Maple
    for n from 1 to 1000 do if 2^n +1 mod n = 0 then lprint(n); fi; od;
    S:=1,3,9,27,81:C:={171,243,13203,2354697,10970073,22032887841}: for c in C do for j from c to 10^8 by 2*c do if 2&^j+1 mod j = 0 then S:=S, j;fi;od;od; S:=op(sort([op({S})])); # Toby Bailey and Christopher J. Smyth, Jan 13 2008
  • Mathematica
    Do[If[PowerMod[2, n, n] + 1 == n, Print[n]], {n, 1, 10^6}]
    k = 9; lst = {1, 3}; While[k < 1000000, a = PowerMod[2, k, k]; If[a + 1 == k, AppendTo[lst, k]]; k += 18]; lst (* Robert G. Wilson v, Jul 06 2009 *)
    Select[Range[10^5], Divisible[2^# + 1, #] &] (* Robert Price, Oct 11 2018 *)
  • PARI
    for(n=1,10^6,if(Mod(2,n)^n==-1,print1(n,", "))); \\ Joerg Arndt, Nov 30 2014
    
  • Python
    A006521_list = [n for n in range(1,10**6) if pow(2,n,n) == n-1] # Chai Wah Wu, Jul 25 2017
    

Extensions

More terms from David W. Wilson, Jul 06 2009

A171980 Prime divisors of elements of A129066.

Original entry on oeis.org

5, 3001, 120041, 532501, 720241, 2160721, 3937501, 9375001, 16505501, 120040001, 158453021, 165055001, 202567501, 289312501, 562500061, 900307501, 985937501, 1500512501, 1512504701, 3169060421, 3301100021, 3908604433, 3993757501
Offset: 1

Views

Author

Max Alekseyev, Jan 20 2010

Keywords

Comments

Corresponding smallest multiples from A129066 are given in A171981.
Prime p>5 is in this sequence if the multiplicative order of (sqrt(5)-3)/2 modulo p is the product of smaller terms of this sequence.

Crossrefs

A087807 Prime factors of solutions to 24^n == 1 (mod n).

Original entry on oeis.org

23, 47, 14759, 49727, 124799, 304751, 497261, 609503, 1828507, 2685259, 10741037, 12872687, 13877879, 23462213, 23652649, 27755759, 29134267, 31908959, 53753807, 65205263, 132771091, 218148653, 341965703, 551361983, 734951759
Offset: 1

Views

Author

Thomas Baruchel, Oct 14 2003

Keywords

Comments

Primes that divide at least one term of A014960.
Prime p is in this sequence iff the multiplicative order of 24 modulo p is the product of smaller terms of this sequence. - Max Alekseyev, May 26 2010

Examples

			A014960(12) = 2870377 = 23 * 124799
		

Crossrefs

Extensions

Corrected and extended by Max Alekseyev, May 26 2010
Edited by Max Alekseyev, Nov 16 2019

A136474 Primes that divide 2^(3^n)+1 for some n.

Original entry on oeis.org

3, 19, 163, 1459, 17497, 52489, 87211, 135433, 139483, 1220347, 5419387, 6049243, 28934011, 86093443, 227862073, 272010961
Offset: 1

Views

Author

Christopher J. Smyth, Feb 16 2008

Keywords

Comments

This sequence is a subsequence of A057719.
272010961 is the last term less than 3*10^9. The n for each prime is 0, 2, 4, 5, 7, 8, 3, 4, 5, 9, 7, 7, 8, 16, 6, 4. Some terms from A111974 are in this sequence also: 411782264189299, 116299474006080119380780339, and 84782316550432407028588866403. If p=2*3^k+1 is prime for an even k, then p is in this sequence.

Examples

			1220347 belongs to the sequence as it is a factor of 2^(3^9)+1 (This is the largest member of the sequence less than 5000000)
		

Crossrefs

Programs

  • Maple
    with(numtheory):L:=3;for p from 5 to 5000000 do if isprime(p) then q:=op(2,ifactors(order(2,p)));if nops(q)=2 then if op(1,op(1,q))=2 and op(2,op(1,q))=1 and op(1,op(2,q))=3 then L:=L,p;fi;fi;fi;od;L;
  • Mathematica
    Reap[Do[p=Prime[n]; mo=MultiplicativeOrder[2, p]; If[EvenQ[mo] && IntegerQ[Log[3,mo/2]], Sow[p]], {n, PrimePi[10^7]}]][[2,1]]

A164816 Prime factors in a divisibility sequence of the Lucas sequence v(P=3,Q=5) of the second kind.

Original entry on oeis.org

3, 17, 103, 163, 373, 487, 1733, 3469, 4373, 8803, 10259, 15607, 16069, 26237, 26297, 31193, 31517, 35153, 37987, 38047, 38149, 39367, 52817, 60427, 60589, 61553, 74357, 76837, 78713, 100733, 103979, 114377, 119891, 152189, 181277, 231131, 235891, 238307, 239783, 280927, 289243, 316903, 338581
Offset: 1

Views

Author

Jonathan Vos Post, Aug 26 2009

Keywords

Comments

This is the last sequence on p. 15 of Smyth. [WARNING: Smyth lists 2 as a possible prime factor, which, in fact, is not possible. - Max Alekseyev, Sep 17 2024]
The Lucas sequence with P = 3, Q = 5 is defined as v=2,3,-1,-18,-49,-57,.. where v(n) = P*v(n-1)-Q*v(n-2), with g.f. (2-3x)/(1-3x+5x^2).
The indices n such that n|v(n) define the sequence T = 1,3,9,27,81,153,243,459,... as listed by Smyth.
The OEIS sequence shows all distinct prime factors of elements of T.

Crossrefs

Extensions

More detailed definition, comments rephrased, non-ascii characters in URL's removed - R. J. Mathar, Sep 09 2009
a(8)-a(9), a(11), a(18) from Jean-François Alcover, Dec 08 2017
Incorrect codes (depending on a search limit) removed, prime 2 removed, terms a(10), (12)-a(17), and a(19) onward added by Max Alekseyev, Sep 17 2024

A289258 Prime factors of numbers in A289257.

Original entry on oeis.org

3, 19, 163, 1459, 8803, 17497, 52489, 78787, 164617, 370387
Offset: 1

Views

Author

Michel Marcus, Jun 29 2017

Keywords

Comments

Kalmynin conjectures that this sequence is infinite.
I have some doubts about terms 17497, 52489, 164617 that are == 1 (mod 8).

Crossrefs

Showing 1-6 of 6 results.