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

A019434 Fermat primes: primes of the form 2^(2^k) + 1, for some k >= 0.

Original entry on oeis.org

3, 5, 17, 257, 65537
Offset: 1

Views

Author

Keywords

Comments

It is conjectured that there are only 5 terms. Currently it has been shown that 2^(2^k) + 1 is composite for 5 <= k <= 32 (see Eric Weisstein's Fermat Primes link). - Dmitry Kamenetsky, Sep 28 2008
No Fermat prime is a Brazilian number. So Fermat primes belong to A220627. For proof see Proposition 3 page 36 in "Les nombres brésiliens" in Links. - Bernard Schott, Dec 29 2012
This sequence and A001220 are disjoint (see "Other theorems about Fermat numbers" in Wikipedia link). - Felix Fröhlich, Sep 07 2014
Numbers n > 1 such that n * 2^(n-2) divides (n-1)! + 2^(n-1). - Thomas Ordowski, Jan 15 2015
From Jaroslav Krizek, Mar 17 2016: (Start)
Primes p such that phi(p) = 2*phi(p-1); primes from A171271.
Primes p such that sigma(p-1) = 2p - 3.
Primes p such that sigma(p-1) = 2*sigma(p) - 5.
For n > 1, a(n) = primes p such that p = 4 * phi((p-1) / 2) + 1.
Subsequence of A256444 and A256439.
Conjectures:
1) primes p such that phi(p) = 2*phi(p-2).
2) primes p such that phi(p) = 2*phi(p-1) = 2*phi(p-2).
3) primes p such that p = sigma(phi(p-2)) + 2.
4) primes p such that phi(p-1) + 1 divides p + 1.
5) numbers n such that sigma(n-1) = 2*sigma(n) - 5. (End)
Odd primes p such that ratio of the form (the number of nonnegative m < p such that m^q == m (mod p))/(the number of nonnegative m < p such that -m^q == m (mod p)) is a divisor of p for all nonnegative q. - Juri-Stepan Gerasimov, Oct 13 2020
Numbers n such that tau(n)*(number of distinct ratio (the number of nonnegative m < n such that m^q == m (mod n))/(the number of nonnegative m < n such that -m^q == m (mod n))) for nonnegative q is equal to 4. - Juri-Stepan Gerasimov, Oct 22 2020
The numbers of primitive roots for the five known terms are 1, 2, 8, 128, 32768. - Gary W. Adamson, Jan 13 2022
Prime numbers such that every residue is either a primitive root or a quadratic residue. - Keith Backman, Jul 11 2022
If there are only 5 Fermat primes, then there are only 31 odd order groups which have a 2-group automorphism group. See the Miles Englezou link for a proof. - Miles Englezou, Mar 10 2025

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 137-141, 197.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see Table 1, p. 458.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
  • Richard K. Guy, Unsolved Problems in Number Theory, A3.
  • Hardy and Wright, An Introduction to the Theory of Numbers, bottom of page 18 in the sixth edition, gives an heuristic argument that this sequence is finite.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 7, 70.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.

Crossrefs

Subsequence of A147545 and of A334101. Cf. also A333788, A334092.
Cf. A045544.

Programs

Formula

a(n+1) = A180024(A049084(a(n))). - Reinhard Zumkeller, Aug 08 2010
a(n) = 1 + A001146(n-1), if 1 <= n <= 5. - Omar E. Pol, Jun 08 2018

A014499 Number of 1's in binary representation of n-th prime.

Original entry on oeis.org

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

Views

Author

Ingemar Assarsjo (ingemar(AT)binomen.se)

Keywords

Comments

a(n) is the rank of prime(n) in the base-2 dominance order on the natural numbers. - Tom Edgar, Mar 25 2014

Examples

			From _M. F. Hasler_, Mar 03 2023: (Start)
a(n) = 1 only for p(n = 1) = 2, the only prime equal to a power of 2.
a(n) = 2 for n in A159611 = A000720(A019434) = {2, 3, 7, 55, 6543} (probably complete), the Fermat primes F[k] = 2^2^k + 1 with k = 0, 1, 2, 3, 4. (On the graph one can distinctly see a(6543) = 2 corresponding to F[4] = 65537.)
a(n) = 3 for n in A000720(A081091) = (4, 5, 6, 8, 12, 13, 19, 21, 25, 32, 33, 44, 98, 106, 116, 136, 174, 191, 310, 313, 319, 565, 568, ...). (End)
		

Crossrefs

Cf. A180024. - Reinhard Zumkeller, Aug 08 2010
Cf. A072084.
Cf. A159611 (indices of 2s), A000720(A081091) (indices of 3s). - M. F. Hasler, Mar 03 2023

Programs

  • Haskell
    a014499 = a000120 . a000040  -- Reinhard Zumkeller, Feb 10 2013
    
  • Magma
    [&+Intseq(NthPrime(n), 2): n in [1..100] ]; // Vincenzo Librandi, Mar 25 2014
    
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n], 2], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
  • PARI
    A014499(n)=hammingweight(prime(n)) \\ M. F. Hasler, Nov 20 2009, updated Mar 03 2023
    
  • Python
    from sympy import prime
    def A014499(n): return prime(n).bit_count() # Chai Wah Wu, Mar 22 2023
  • Sage
    [sum(i.digits(base=2)) for i in primes_first_n(200)] # Tom Edgar, Mar 25 2014
    

Formula

a(n) = A000120(A000040(n)).
a(A049084(A061712(n))) = n. - Reinhard Zumkeller, Feb 10 2013
a(n) = [x^prime(n)] (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Mar 27 2018

A023503 Greatest prime divisor of prime(n) - 1.

Original entry on oeis.org

2, 2, 3, 5, 3, 2, 3, 11, 7, 5, 3, 5, 7, 23, 13, 29, 5, 11, 7, 3, 13, 41, 11, 3, 5, 17, 53, 3, 7, 7, 13, 17, 23, 37, 5, 13, 3, 83, 43, 89, 5, 19, 3, 7, 11, 7, 37, 113, 19, 29, 17, 5, 5, 2, 131, 67, 5, 23, 7, 47, 73, 17, 31, 13, 79, 11, 7, 173, 29, 11, 179, 61, 31, 7, 191
Offset: 2

Views

Author

Keywords

Comments

Baker & Harman (1998) show that there are infinitely many n such that a(n) > prime(n)^0.677. This improves on earlier work of Goldfeld, Hooley, Fouvry, Deshouillers, Iwaniec, Motohashi, et al.
Fouvry shows that a(n) > prime(n)^0.6683 for a positive proportion of members of this sequence. See Fouvry and also Baker & Harman (1996) which corrected an error in the former work.
The record values are the Sophie Germain primes A005384. - Daniel Suteu, May 09 2017
Conjecture: every prime is in the sequence. Cf. A035095 (see my comment). - Thomas Ordowski, Aug 06 2017
a(n) is 2 for n in A159611, and is at most 3 for n in A174099. Conjecture: liminf a(n) = 3. - Jeppe Stig Nielsen, Jul 04 2020

Crossrefs

Programs

  • Maple
    A023503 := proc(n)
        A006530(ithprime(n)-1) ;
    end proc:
    seq( A023503(n),n=2..80) ; # R. J. Mathar, Sep 07 2016
  • Mathematica
    Table[FactorInteger[Prime[n] - 1][[-1, 1]], {n, 2, 100}] (* T. D. Noe, Jun 08 2011 *)
  • PARI
    a(n) = vecmax(factor(prime(n)-1)[,1]); \\ Michel Marcus, Aug 15 2015

Formula

a(n) = A006530(A006093(n)). - Michel Marcus, Aug 15 2015

Extensions

Comments, references, and links from Charles R Greathouse IV, Mar 04 2011

A098006 (p-1)/2 - phi(p-1) as p runs through the odd primes.

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 3, 1, 2, 7, 6, 4, 9, 1, 2, 1, 14, 13, 11, 12, 15, 1, 4, 16, 10, 19, 1, 18, 8, 27, 17, 4, 25, 2, 35, 30, 27, 1, 2, 1, 42, 23, 32, 14, 39, 57, 39, 1, 42, 4, 23, 56, 25, 0, 1, 2, 63, 50, 44, 49, 2, 57, 35, 60, 2, 85, 72, 1, 62, 16, 1, 63, 66, 81, 1, 2, 78, 40, 76, 29, 114, 47
Offset: 2

Views

Author

N. J. A. Sloane, Sep 08 2004

Keywords

Comments

In the Luca-Walsh paper it is shown that there are infinitely many numbers not in this sequence. See A098047.
a(n)=0 for Fermat primes (A019434). a(n)=1 for safe primes (A005385). a(n)=2 for A090866. The least prime p for which (p-1)/2-phi(p-1)=n or 0 if there is no such prime is given by A134765(n). Sequence A134854(k) gives the least prime for which a(n)=2^(k-1). For k not a power of 2, it can be shown that if k is in this sequence, then it appears for a prime p <= 1+k^2. - T. D. Noe, Nov 13 2007

References

  • J. Browkin and A. Schinzel, On integers not of the form n-phi(n), Colloq. Math., 68 (1995), 55-58.
  • F. Luca and P. G. Walsh, On the number of nonquadratic residues which are not primitive roots, Colloq. Math., 100 (2004), 91-93.

Crossrefs

Cf. A000010, A051953, A098047, A176095 (p runs through the odd numbers).

Programs

  • Haskell
    a098006 n = a005097 (n-1) - a000010 (a006093 n)
    -- Reinhard Zumkeller, Mar 26 2013
    
  • Magma
    [(NthPrime(n)-1)/2 - EulerPhi(NthPrime(n)-1): n in [2..100]]; // Vincenzo Librandi, Jan 10 2017
  • Maple
    A098006 := proc(n)
        local p;
        p := ithprime(n+1) ;
        (p-1)/2-numtheory[phi](p-1) ;
    end proc:
    seq(A098006(n),n=1..30) ; # R. J. Mathar, Jan 09 2017
  • Mathematica
    Table[(Prime[n] - 1)/2 - EulerPhi[Prime[n] - 1], {n, 2, 85}] (* Robert G. Wilson v, Sep 09 2004 *)
    Table[(n-1)/2-EulerPhi[n-1],{n,Prime[Range[2,100]]}] (* Harvey P. Dale, Oct 23 2016 *)
  • PARI
    forprime(p=3,1e3,print1(p\2-eulerphi(p-1)", ")) \\ Charles R Greathouse IV, Feb 04 2013
    

Formula

a(n) = A005097(n-1) - A000010(A006093(n)); a(A159611(n)) = 0. - Reinhard Zumkeller, Mar 26 2013

A335432 Number of anti-run permutations of the prime indices of Mersenne numbers A000225(n) = 2^n - 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 6, 2, 6, 2, 36, 1, 6, 6, 24, 1, 24, 1, 240, 6, 24, 2, 1800, 6, 6, 6, 720, 6, 1800, 1, 120, 24, 6, 24, 282240, 2, 6, 24, 15120, 2, 5760, 6, 5040, 720, 24, 6, 1451520, 2, 5040, 120, 5040, 6, 1800, 720, 40320, 24, 720, 2, 1117670400, 1, 6, 1800, 5040, 6
Offset: 1

Views

Author

Gus Wiseman, Jul 02 2020

Keywords

Comments

An anti-run is a sequence with no adjacent equal parts.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(1) = 1 through a(10) = 6 permutations:
  ()  (2)  (4)  (2,3)  (11)  (2,4,2)  (31)  (2,3,7)  (21,4)  (11,2,5)
                (3,2)                       (2,7,3)  (4,21)  (11,5,2)
                                            (3,2,7)          (2,11,5)
                                            (3,7,2)          (2,5,11)
                                            (7,2,3)          (5,11,2)
                                            (7,3,2)          (5,2,11)
		

Crossrefs

The version for factorial numbers is A335407.
Anti-run compositions are A003242.
Anti-run patterns are A005649.
Permutations of prime indices are A008480.
Anti-runs are ranked by A333489.
Separable partitions are ranked by A335433.
Inseparable partitions are ranked by A335448.
Anti-run permutations of prime indices are A335452.
Strict permutations of prime indices are A335489.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[2^n-1]],!MatchQ[#,{_,x_,x_,_}]&]],{n,0,30}]
  • PARI
    \\ See A335452 for count.
    a(n) = {count(factor(2^n-1)[,2])} \\ Andrew Howroyd, Feb 03 2021

Formula

a(n) = A335452(A000225(n)).

Extensions

Terms a(51) and beyond from Andrew Howroyd, Feb 03 2021

A378616 Greatest non prime power <= prime(n).

Original entry on oeis.org

1, 1, 1, 6, 10, 12, 15, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 255, 262, 268, 270
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2024

Keywords

Comments

Conjecture: Equal to A006093(n) = prime(n) - 1 except at terms of A159611.

Examples

			The first number line below shows the non prime powers. The second shows the primes:
--1-------------6----------10----12----14-15-------18----20-21-22----24--
=====2==3====5=====7==========11====13==========17====19==========23=====
		

Crossrefs

For nonprime instead of non prime power we have A156037.
Restriction of A378367.
Lengths are A378615.
For nonsquarefree: A378032 (diffs A378034), restriction of A378033 (diffs A378036).
A000040 lists the primes, differences A001223
A000961 and A246655 list the prime powers, differences A057820.
A024619 lists the non prime powers, differences A375735, seconds A376599.
A080101 counts prime powers between primes (exclusive), inclusive A366833.
A361102 lists the non powers of primes, differences A375708.
Prime powers between primes:
- A377057 positive
- A377286 zero
- A377287 one
- A377288 two

Programs

  • Mathematica
    Table[Max[Select[Range[Prime[n]],Not@*PrimePowerQ]],{n,100}]

A343557 Indices of the prime factors of Fermat numbers in the sequence of primes.

Original entry on oeis.org

2, 3, 7, 55, 116, 6543, 10847, 23974, 27567, 76709, 177975, 457523, 887643, 1625567, 2751966, 3772007, 9385401, 42401669, 61136051, 301137372, 2946723445, 7632981296, 24728168164, 98261951745, 99582868271, 159657063059, 231641062432, 851793186025, 870658222248
Offset: 1

Views

Author

Keywords

Examples

			A000040(a(5)) = A000040(116) = 641 = A023394(5).
		

Crossrefs

Cf. A000040 (primes), A000720 (primepi), A023394 (prime factors of Fermat primes).
Supersequence of A159611.

Programs

  • Maple
    q:=n->(irem(2^(2^padic:-ordp(ithprime(n)-1, 2))-1, ithprime(n)) = 0):
    select(q, [$1..10^5])[]; # Lorenzo Sauras Altuzarra, Feb 20 2023
  • PARI
    is_a023394(p)=p>2 && Mod(2,p)^lift(Mod(2,znorder(Mod(2,p)))^p)==1 && isprime(p) \\ after Charles R Greathouse IV in A023394
    my(i=1); forprime(p=1, , if(is_a023394(p), print1(i, ", ")); i++) \\ Felix Fröhlich, Apr 30 2021

Formula

a(n) = A000720(A023394(n)).
A000040(a(n)) = A023394(n).

Extensions

More terms from Michel Marcus, Apr 29 2021
More terms from Amiram Eldar, Apr 29 2021

A173995 Continued fraction expansion of sum of reciprocals of Fermat primes.

Original entry on oeis.org

0, 1, 1, 2, 9, 1, 3, 5, 1, 2, 1, 1, 1, 1, 3, 1, 7, 1, 31, 1, 2, 4, 5
Offset: 1

Views

Author

Jonathan Vos Post, Mar 04 2010

Keywords

Comments

If there are only five Fermat primes, a(24) = 2 is the last term of this sequence. Otherwise, a(24) = a(25) = 1 and a(26) is large (billions of digits).
This sequence is finite if and only if A019434 is finite.

Examples

			(1/3) + (1/5) + (1/17) + (1/257) + (1/65537) = 2560071829/4294967295 = 0 + 1/1+ 1/1+ 1/2+ 1/9+ 1/1+ 1/3+ 1/5+ 1/1+ 1/2+ 1/1+ 1/1+ 1/1+ 1/1+ 1/3+ 1/1+ 1/7+ 1/1+ 1/31+ 1/1+ 1/2+ 1/4+ 1/5+ 1/2.
		

References

  • S. W. Golomb, Irrationality of the sum of reciprocals of fermat numbers and other functions, NASA Technical Report 19630013175, Accession ID 63N23055, Contract/grant NAS7-100, 4 pp., Jet Propulsion Laboratory, Jan 01 1962.

Crossrefs

Cf. A019434, A000215, A159611, A173898 (sum of reciprocals of Mersenne primes), A007400.

Programs

  • Mathematica
    (* Assuming 65537 is the largest Fermat prime *) ContinuedFraction[Sum[1/(2^(2^n) + 1), {n, 0, 4}]] (* Alonso del Arte, Apr 21 2013 *)

Formula

Continued fraction of Sum_{i >= 1} 1/A019434(i).

Extensions

Sequence corrected and comments added by Charles R Greathouse IV, Feb 04 2011
Showing 1-8 of 8 results.