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

A023212 Primes p such that 4*p+1 is also prime.

Original entry on oeis.org

3, 7, 13, 37, 43, 67, 73, 79, 97, 127, 139, 163, 193, 199, 277, 307, 373, 409, 433, 487, 499, 577, 619, 673, 709, 727, 739, 853, 883, 919, 997, 1033, 1039, 1063, 1087, 1093, 1123, 1129, 1297, 1327, 1423, 1429, 1453, 1543, 1549, 1567, 1579, 1597, 1663, 1753
Offset: 1

Views

Author

Keywords

Comments

If p > 3 is a Sophie Germain prime (A005384), p cannot be in this sequence, because all Germain primes greater than 3 are of the form 6k - 1, and then 4p + 1 = 3*(8k-1). - Enrique Pérez Herrero, Aug 15 2011
a(n), except 3, is of the form 6k+1. - Enrique Pérez Herrero, Aug 16 2011
According to Beiler: the integer 2 is a primitive root of all primes of the form 4p + 1 with p prime. - Martin Renner, Nov 06 2011
Chebyshev showed that 2 is a primitive root of all primes of the form 4p + 1 with p prime. - Jonathan Sondow, Feb 04 2013
Also solutions to the equation: floor(4/A000005(4*n^2+n)) = 1. - Enrique Pérez Herrero, Jan 12 2013
Prime numbers p such that p^p - 1 is divisible by 4*p + 1. - Gary Detlefs, May 22 2013
It appears that whenever (p^p - 1)/(4*p + 1) is an integer, then this integer is even (see previous comment). - Alexander R. Povolotsky, May 23 2013
4p + 1 does not divide p^n + 1 for any n. - Robin Garcia, Jun 20 2013
Primes in this sequence of the form 4k+1 are listed in A113601. - Gary Detlefs, May 07 2019
There are no numbers with last digit 1 in this list (i.e., members of A030430) because primes p == 1 (mod 10) lead to 5|(4p+1) such that 4p+1 is not prime. - R. J. Mathar, Aug 13 2019

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York: Dover, (2nd ed.) 1966, p. 102, nr. 5.
  • P. L. Chebyshev, Theory of congruences, Elements of number theory, Chelsea, 1972, p. 306.

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(n) and IsPrime(4*n+1)]; // Vincenzo Librandi, Nov 20 2010
    
  • Maple
    isA023212 := proc(n)
        isprime(n) and isprime(4*n+1) ;
    end proc:
    for n from 1 to 1800 do
        if isA023212(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, May 26 2013
  • Mathematica
    Select[Range[2000], PrimeQ[#] && PrimeQ[4# + 1] &] (* Alonso del Arte, Aug 15 2011 *)
    Join[{3}, Select[Range[7, 2000, 6], PrimeQ[#] && PrimeQ[4# + 1] &]] (* Zak Seidov, Jan 21 2012 *)
    Select[Prime[Range[300]],PrimeQ[4#+1]&] (* Harvey P. Dale, Oct 17 2021 *)
  • PARI
    forprime(p=2,1800,if(Mod(p,4*p+1)^p==1, print1(p", \n"))) \\ Alexander R. Povolotsky, May 23 2013

Formula

Sum_{n>=1} 1/a(n) is in the interval (0.892962433, 1.1616905) (Wagstaff, 2021). - Amiram Eldar, Nov 04 2021

Extensions

Name edited by Michel Marcus, Nov 27 2020

A125135 Triangle read by rows in which row n lists prime factors of p^p - 1 where p = prime(n).

Original entry on oeis.org

3, 2, 13, 2, 2, 11, 71, 2, 3, 29, 4733, 2, 5, 15797, 1806113, 2, 2, 3, 53, 264031, 1803647, 2, 2, 2, 2, 10949, 1749233, 2699538733, 2, 3, 3, 109912203092239643840221, 2, 11, 461, 1289, 831603031789, 1920647391913
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2007

Keywords

Examples

			Triangle begins:
3;
2, 13;
2, 2, 11, 71;
2, 3, 29, 4733;
2, 5, 15797, 1806113;
2, 2, 3, 53, 264031, 1803647;
2, 2, 2, 2, 10949, 1749233, 2699538733;
2, 3, 3, 109912203092239643840221;
2, 11, 461, 1289, 831603031789, 1920647391913;
2, 2, 7, 59, 16763, 84449, 2428577, 14111459, 58320973, 549334763;
...
n=4: p=7, 7^7-1 = 823542 = 2*3*29*4733 gives row 4.
		

Crossrefs

Programs

  • Magma
    for p in [ n : n in [1..100] | IsPrime(n) ] do "\nDoing p =", p; n := p^p -1; Factorisation(n); end for; // John Cannon
  • Maple
    T:= n-> (p-> sort(map(i-> i[1]$i[2], ifactors(p^p-1)[2]))[])(ithprime(n)):
    seq(T(n), n=1..10);  # Alois P. Heinz, May 20 2022

A125137 a(n) = p^p + 1, where p = prime(n).

Original entry on oeis.org

5, 28, 3126, 823544, 285311670612, 302875106592254, 827240261886336764178, 1978419655660313589123980, 20880467999847912034355032910568, 2567686153161211134561828214731016126483470, 17069174130723235958610643029059314756044734432, 10555134955777783414078330085995832946127396083370199442518
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2007

Keywords

Crossrefs

See A125136 for factorizations. Cf. A088730, A125135.

Programs

Formula

a(n) = A051674(n)+1. - R. J. Mathar, Apr 23 2007

A125136 Triangle read by rows in which row n gives list of prime factors of p^p + 1 where p = prime(n).

Original entry on oeis.org

5, 2, 2, 7, 2, 3, 521, 2, 2, 2, 113, 911, 2, 2, 3, 23, 89, 199, 58367, 2, 7, 13417, 20333, 79301, 2, 3, 3, 45957792327018709121, 2, 2, 5, 108301, 1049219, 870542161121, 2, 2, 2, 3, 47, 139, 1013, 1641281, 52626071, 1522029233, 2, 3, 5, 233, 6864997
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2007

Keywords

Comments

Product over the n-th row of the table is A051674(n) + 1. The number of elements in the n-th row is A115973(n). - R. J. Mathar, Jan 22 2007
(p + 1) divides p^p + 1 for odd prime p. - Alexander Adamchuk, Jan 22 2007

Examples

			Rows read
  5;
  2, 2, 7;
  2, 3, 521;
  2, 2, 2, 113, 911;
  2, 2, 3, 23, 89, 199, 58367;
  2, 7, 13417, 20333, 79301;
  2, 3, 3, 45957792327018709121;
  2, 2, 5, 108301, 1049219, 870542161121;
  2, 2, 2, 3, 47, 139, 1013, 1641281, 52626071, 1522029233;
  2, 3, 5, 233, 6864997, 9487923853, 5639663878716545087233;
  2, 2, 2, 2, 2, 373, 1613, 62869, 145577, 35789156484227, 2706690202468649;
  etc.
		

Crossrefs

Cf. A007571 = largest factor of n^n + 1.

Programs

  • Maple
    pfs := proc(n) local ifs,a,e,b ; ifs := ifactors(n)[2] ; a := [] ; for b from 1 to nops(ifs) do for e from 1 to op(2,op(b,ifs)) do a := [op(a),op(1,op(b,ifs))] ; od ; od ; RETURN(a) ; end; A125136 := proc(nmax) local a,p,n,pp ; a := [] ; p := 2 ; while nops(a) < nmax do a := [op(a),op(pfs(p^p+1))] ; p := nextprime(p) ; od ; RETURN(a) ; end; A125136(40) ; # R. J. Mathar, Jan 22 2007
  • Mathematica
    lpf[n_]:=Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]; lpf/@(#^#+1&/@ Prime[Range[10]])//Flatten (* Harvey P. Dale, Oct 18 2020 *)

Extensions

More terms from Alexander Adamchuk and R. J. Mathar, Jan 22 2007

A307653 a(n) = Sum_{d|n} mu(d) * d^d.

Original entry on oeis.org

1, -3, -26, -3, -3124, 46626, -823542, -3, -26, 9999996872, -285311670610, 46626, -302875106592252, 11112006824734470, 437893890380856224, -3, -827240261886336764176, 46626, -1978419655660313589123978, 9999996872, 5842587018385982521380300852
Offset: 1

Views

Author

Seiichi Manyama, Apr 20 2019

Keywords

Examples

			a(6) = 1 - 2^2 - 3^3 + 6^6 = 46626.
		

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, MoebiusMu[#]*#^# &] &, 21] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    {a(n) = sumdiv(n, d, moebius(d)*d^d)}

Formula

a(prime(n)^m) = 1 - prime(n)^prime(n) = -A088730(n) for m > 0.
G.f.: Sum_{k>=1} mu(k)*k^k*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 20 2019

A088807 Number of distinct prime factors of p^p - 1 where p = prime(n).

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 4, 3, 6, 9, 4, 9, 7, 6, 5, 7, 5, 7, 9, 7, 12, 8, 6, 8, 8, 11, 8, 6, 7, 10, 9, 7, 13
Offset: 1

Views

Author

Cino Hilliard, Nov 23 2003

Keywords

Crossrefs

Programs

  • Mathematica
    PrimeNu/@Table[p^p-1,{p,Prime[Range[30]]}] (* The program takes a long time to run. *) (* Harvey P. Dale, Sep 05 2020 *)
  • PARI
    omegaptop(n,m) = { sr=0; forprime(x=2,n, y=omega(x^x-m); print1(y","); sr += 1.0/y; ); print(); }
    
  • Python
    from sympy import factorint, prime
    def a(n): p = prime(n); return len(factorint(p**p-1).values())
    print([a(n) for n in range(1, 12)]) # Michael S. Branicky, May 27 2022

Formula

a(n) = A344870(A000040(n)). - Amiram Eldar, Jul 04 2024

Extensions

More terms from Ray Chandler, Feb 21 2004
Name clarified, offset and data corrected and a(27)-a(33) added by Amiram Eldar, Jul 04 2024

A368107 Prime powers p^m such that p | m.

Original entry on oeis.org

4, 16, 27, 64, 256, 729, 1024, 3125, 4096, 16384, 19683, 65536, 262144, 531441, 823543, 1048576, 4194304, 9765625, 14348907, 16777216, 67108864, 268435456, 387420489, 1073741824, 4294967296, 10460353203, 17179869184, 30517578125, 68719476736, 274877906944, 282429536481
Offset: 1

Views

Author

Michael De Vlieger, Jan 15 2024

Keywords

Comments

Proper subset of A072873, which in turn is a proper subset of A342090.
This sequence represents the prime power block in A072873 and A342090.
A342090 \ {a(n)} is in A126706.
A072873 \ {{1} U {a(n)}} is in A286708, in turn a proper subset of A001694.
Contains A051674.

Examples

			This sequence contains prime powers of the following form:
  2^2, 2^4, i.e., 2^k such that k is even.
  3^3, 3^6, 3^9, i.e., 3^k such that 3 | k.
  5^5, 5^10, 5^15, i.e., 5^k such that 5 | k, etc.
		

Crossrefs

Programs

  • Maple
    N:= 10^13: # for terms <= N
    R:= NULL:
    for i from 1 do
      p:= ithprime(i);
      if p^p > N then break fi;
      R:= R, seq(p^k,k=p..floor(log[p](N)), p);
    od:
    sort([R]); # Robert Israel, Jan 16 2024
  • Mathematica
    nn = 10^12; i = 1; p = 2; While[p^p <= nn, p = NextPrime[p] ];
    MapIndexed[Set[S[First[#2]], #1] &, Prime@ Range@ PrimePi[p] ];
    Union@ Reap[
        While[j = S[i];
        While[S[i]^j < nn,
          Sow[S[i]^j]; j += S[i] ]; j > 2,
        i++] ][[-1, 1]]
  • Python
    import heapq
    from itertools import islice
    from sympy import nextprime
    def agen(): # generator of terms
        v, h, m, nextp = 4, [(4, 2)], 4, 3
        while True:
            v, p = heapq.heappop(h)
            yield v
            if v >= m:
                m = nextp**nextp
                heapq.heappush(h, (m, nextp))
                nextp = nextprime(nextp)
            heapq.heappush(h, (v*p**p, p))
    print(list(islice(agen(), 31))) # Michael S. Branicky, Jan 16 2024
    
  • Python
    from sympy import integer_nthroot, primefactors
    def A368107(n):
        def f(x):
            c = n+x
            for k in range(1,x.bit_length()):
                m = integer_nthroot(x,k)[0]
                c -= sum(1 for p in primefactors(k) if p<=m)
            return c
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 12 2024

Formula

Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/A088730(n) = 0.372116188498... . - Amiram Eldar, Jan 20 2024

A376431 a(n) is the least odd prime factor of prime(n)^prime(n)-1.

Original entry on oeis.org

3, 13, 11, 3, 5, 3, 10949, 3, 11, 7, 3, 3, 5, 3, 23, 13, 29, 3, 3, 5, 3, 3, 41, 11, 3, 5, 3, 53, 3, 7, 3, 5, 17, 3, 37, 3, 3, 3, 83, 43, 89, 3, 5, 3, 7, 3, 3, 3, 113, 3, 29, 7, 3, 5, 21589, 131, 67, 3, 3, 5, 3, 73, 3, 5, 3, 79, 3, 3, 173, 3, 11, 179, 3, 3, 3, 191
Offset: 1

Views

Author

Hugo Pfoertner, Sep 27 2024

Keywords

Crossrefs

Programs

  • PARI
    a376431(n) = my(pp=prime(n)^prime(n)-1); forprime (p=3, oo, if(pp%p==0, return(p)))

Formula

a(n) = A078701(A088730(n)). - Michel Marcus, Sep 27 2024

A088816 Numbers of the form p^p - 2 where p is prime.

Original entry on oeis.org

2, 25, 3123, 823541, 285311670609, 302875106592251, 827240261886336764175, 1978419655660313589123977, 20880467999847912034355032910565, 2567686153161211134561828214731016126483467
Offset: 1

Views

Author

Cino Hilliard, Nov 23 2003

Keywords

Comments

Sum of reciprocals = 0.5403214192032919719402677251

Programs

  • Mathematica
    #^#-2&/@Prime[Range[10]] (* Harvey P. Dale, Sep 22 2014 *)
  • PARI
    ptop(n,m) = { sr=0; forprime(x=2,n, y=x^x-m; print1(y","); sr += 1.0/y; ); print(); print(sr) }

Formula

a(n) = A088730(n)-1=A088731(n)+1. - R. J. Mathar, Apr 26 2007
Showing 1-9 of 9 results.