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-10 of 89 results. Next

A071167 a(n) = A023194 - A062700(n). Negative values of A071166(m) = m-A006530(A000203(m)) differences. In these cases m is square number from A023194.

Original entry on oeis.org

-1, -3, -4, -15, -6, -63, -18, -364, -42, -400, -60, -4095, -72, -90, -102, -3906, -132, -168, -2380, -174, -65535, -5220, -294, -384, -262143, -12720, -678, -702, -265720, -744, -762, -774, -828, -840, -25260, -858, -912, -1092, -1098, -1164, -1182, -1194, -1218, -1374, -1428, -1488, -1560
Offset: 1

Views

Author

Labos Elemer, May 15 2002

Keywords

Examples

			m=29929=173, sigma[29929]=1+173+29929=30103 and 29929-30103=-174, the 20th term here.
		

Crossrefs

Programs

  • Mathematica
    ma[x_] := Part[Reverse[Flatten[FactorInteger[x]]], 2] Do[s=n-ma[DivisorSigma[1, n]]; If[Equal[Sign[s], -1], Print[s]], {n, 2, 10000000}]
  • PARI
    for(n=1,1e3,if(isprime(s=sigma(n^2)),print1(n^2-s", "))) \\ Charles R Greathouse IV, Feb 19 2013

Formula

Values of m - A006530(A000203(m)) differences, when m < A006530(A000203(m)).

A275940 a(n) = A000005(A023194(n)).

Original entry on oeis.org

2, 3, 3, 5, 3, 7, 3, 7, 3, 5, 3, 13, 3, 3, 3, 7, 3, 3, 5, 3, 17, 5, 3, 3, 19, 5, 3, 3, 13, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7
Offset: 1

Views

Author

Altug Alkan, Aug 13 2016

Keywords

Comments

All the terms are primes. - Amiram Eldar, Jan 25 2025

Examples

			a(5) = A000005(A023194(5)) = A000005(25) = 3.
		

Crossrefs

Programs

  • Mathematica
    DivisorSigma[0, #] &@ Prepend[Select[Range[5000]^2, PrimeQ[DivisorSigma[1, #]] &], 2] (* Michael De Vlieger, Aug 14 2016, after Harvey P. Dale at A023194 *)
  • PARI
    lista(nn) = for(n=1, nn, if(isprime(sigma(n)), print1(numdiv(n), ", ")));

A077137 Duplicate of A023194.

Original entry on oeis.org

2, 4, 9, 16, 25, 64, 289, 729, 1681, 2401, 3481, 4096, 5041, 7921, 10201, 15625
Offset: 1

Views

Author

Keywords

A023195 Prime numbers that are the sum of the divisors of some n.

Original entry on oeis.org

3, 7, 13, 31, 127, 307, 1093, 1723, 2801, 3541, 5113, 8011, 8191, 10303, 17293, 19531, 28057, 30103, 30941, 86143, 88741, 131071, 147073, 292561, 459007, 492103, 524287, 552793, 579883, 598303, 684757, 704761, 732541, 735307, 797161, 830833, 1191373
Offset: 1

Views

Author

Keywords

Comments

If n > 2 and sigma(n) is prime, then n must be an even power of a prime number. For example, 1093 = sigma(3^6). - T. D. Noe, Jan 20 2004
All primes of the form 2^n-1 (Mersenne primes) are in the sequence because if n is a natural number then sigma(2^(n-1)) = 2^n-1. So A000668 is a subsequence of this sequence. If sigma(n) is prime then n is of the form p^(q-1) where both p & q are prime (the proof is easy). - Farideh Firoozbakht, May 28 2005
Primes of the form 1 + p + p^2 + ... + p^k where p is prime.
If n = sigma(p^k) is in the sequence, then k+1 is prime. - Franklin T. Adams-Watters, Dec 19 2011
Primes that are a repunit in a prime base. - Franklin T. Adams-Watters, Dec 19 2011.
Except for 3, these primes are particular Brazilian primes belonging to A085104. These prime numbers are also Brazilian primes of the form (p^x - 1)/(p^y - 1), p prime, belonging to A003424, with here x is prime, and y = 1. [See section V.4 of Quadrature article in Links.] - Bernard Schott, Dec 25 2012
From Bernard Schott, Dec 25 2012: (Start)
Others subsequences of this sequence:
A053183 for 111_p = p^2 + p + 1 when p is prime.
A190527 for 11111_p = p^4 + p^3 + p^2 + p + 1 when p is prime.
A194257 for 1111111_p = p^6 + p^5 + p^4 + p^3 + p^2 + p + 1 when p is prime. (End)
Subsequence of primes from A002191. - Michel Marcus, Jun 10 2014

Examples

			307 = 1 + 17 + 17^2; 307 and 17 are primes.
		

Crossrefs

Intersection of A002191 and A000040.
Cf. A000203, A000668, A023194 (the n that produce these primes), A053696, A085104, A003424, A053183, A190527, A194257.

Programs

  • Mathematica
    t={3}; lim=10^9; n=1; While[p=Prime[n]; k=2; s=1+p+p^2; sHarvey P. Dale, Jun 18 2022 *)
  • PARI
    upto(lim)=my(v=List([3]),t); forprime(p=2,solve(x=1,lim^(1/4), x^4+x^3+x^2+x+1-lim), forprime(e=5,1+log(lim)\log(p), if(isprime(t=sigma(p^(e-1))) && t<=lim, listput(v,t)))); forprime(p=2, solve(x=1,lim^(1/2),x^2+x+1-lim), if(isprime(t=p^2+p+1), listput(v,t))); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Dec 20 2011
    
  • Python
    from sympy import isprime, divisor_sigma
    A023195_list = sorted(set([3]+[n for n in (divisor_sigma(d**2) for d in range(1,10**4)) if isprime(n)])) # Chai Wah Wu, Jul 23 2016

A342925 a(n) = A003415(sigma(n)), where A003415 is the arithmetic derivative, and sigma is the sum of divisors of n.

Original entry on oeis.org

0, 1, 4, 1, 5, 16, 12, 8, 1, 21, 16, 32, 9, 44, 44, 1, 21, 16, 24, 41, 80, 60, 44, 92, 1, 41, 68, 92, 31, 156, 80, 51, 112, 81, 112, 20, 21, 92, 92, 123, 41, 272, 48, 124, 71, 156, 112, 128, 22, 34, 156, 77, 81, 244, 156, 244, 176, 123, 92, 332, 33, 272, 164, 1, 124, 384, 72, 165, 272, 384, 156, 119, 39, 101, 128, 188
Offset: 1

Views

Author

Antti Karttunen, Apr 07 2021

Keywords

Crossrefs

Cf. A023194 (positions of ones, which is a subsequence of prime powers, A000961).
Cf. A342021 (fixed points), A343216 [positions k where a(k) < k], A343217 [a(k) >= k], A343218 [a(k) > k].
Cf. A347870 (parity of terms), A347872, A347873, A347877 (positions of odd terms), A347878 (of even terms), A343218, A343220, A344024.

Programs

  • Mathematica
    Array[If[# < 2, 0, # Total[#2/#1 & @@@ FactorInteger[#]]] &@ DivisorSigma[1, #] &, 76] (* Michael De Vlieger, Apr 08 2021 *)
  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A342925(n) = A003415(sigma(n));

Formula

a(A023194(n)) = 1.
If gcd(m,n) = 1, a(m*n) = sigma(m)*A003415(sigma(n)) + sigma(n)*A003415(sigma(m)) = sigma(m)*a(n) + sigma(n)*a(m).
a(n) = (A351568(n)*A351571(n)) + (A351569(n)*A351570(n)). - Antti Karttunen, Feb 23 2022

A009087 Numbers whose number of divisors is prime (i.e., numbers of the form p^(q-1) for primes p,q).

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 11, 13, 16, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Invented by the HR Automatic Concept Formation Program. If the sum of divisors is prime, then the number of divisors is prime, i.e., this is a supersequence of A023194.
A010055(a(n)) * A010051(A100995(a(n))+1) = 1. - Reinhard Zumkeller, Jun 06 2013

Examples

			tau(16)=5 and 5 is prime.
		

References

  • S. Colton, Automated Theory Formation in Pure Mathematics. New York: Springer (2002)

Crossrefs

Subsequence of A000961.

Programs

  • Haskell
    a009087 n = a009087_list !! (n-1)
    a009087_list = filter ((== 1) . a010051 . (+ 1) . a100995) a000961_list
    -- Reinhard Zumkeller, Jun 05 2013
    
  • Mathematica
    Select[Range[250],PrimeQ[DivisorSigma[0,#]]&] (* Harvey P. Dale, Sep 28 2011 *)
  • PARI
    is(n)=isprime(isprimepower(n)+1) \\ Charles R Greathouse IV, Sep 16 2015
    
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A009087(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k-1)[0]) for k in primerange(x.bit_length()+1)))
        return bisection(f,n,n) # Chai Wah Wu, Feb 22 2025

Formula

p^(q-1), p, q primes.

A062700 Terms of A000203 that are prime.

Original entry on oeis.org

3, 7, 13, 31, 31, 127, 307, 1093, 1723, 2801, 3541, 8191, 5113, 8011, 10303, 19531, 17293, 28057, 30941, 30103, 131071, 88741, 86143, 147073, 524287, 292561, 459007, 492103, 797161, 552793, 579883, 598303, 684757, 704761, 732541, 735307
Offset: 1

Views

Author

Jason Earls, Jul 11 2001

Keywords

Comments

Sorted and duplicates removed, this gives A023195.

Examples

			sigma(2) = 3, sigma(4) = 7, sigma(9) = 13 are the first three prime terms of A000203. Hence the sequence starts 3, 7, 13.
		

Crossrefs

Cf. A000203 (sigma(n), sum of divisors of n), A023194, A034885 (record values of sigma(n)), A023195 (prime numbers that are the sum of the divisors of some n), A100382 (record values of A062700).

Programs

  • Magma
    [ c: n in [1..1000000] | IsPrime(c) where c:=SumOfDivisors(n) ]; // Klaus Brockhaus, Oct 21 2009
    
  • Mathematica
    Select[DivisorSigma[1,Range[1000000]],PrimeQ] (* Harvey P. Dale, Nov 09 2012 *)
  • PARI
    je=[]; for(n=1,1000000, if(isprime(sigma(n)),je=concat(je, sigma(n)))); je
    
  • PARI
    { n=0; for (m=1, 10^9, if(isprime(a=sigma(m)), write("b062700.txt", n++, " ", a); if (n==100, break)) ) } \\ Harry J. Smith, Aug 09 2009
    
  • Python
    from sympy import isprime, divisor_sigma
    A062700_list = [3]+[n for n in (divisor_sigma(d**2) for d in range(1,10**4)) if isprime(n)] # Chai Wah Wu, Jul 23 2016

Formula

a(n) = A000203(A023194(n)). - Michel Marcus, Oct 19 2019

Extensions

Edited by Klaus Brockhaus, Oct 21 2009

A249759 Primes p such that sigma(p-1) is a prime q.

Original entry on oeis.org

3, 5, 17, 65537
Offset: 1

Views

Author

Jaroslav Krizek, Nov 13 2014

Keywords

Comments

Subsequence of {A023194(n)+1}.
Conjectures: 1) sequence is finite; 2) sequence is a subsequence of A019434 (Fermat primes); 3) sequence consists of Fermat primes p such that sigma(p-1) is a Mersenne prime; 4) a(n) = (A249761(n)+3)/2.
3 is the only prime p such that sigma(p+1) is prime, i.e., 3 is the only prime p such that sigma(p-1) and sigma(p+1) are both primes.
Conjecture: 3 is the only number n such that n and sigma(n+1) are both prime.
Primes p such that A051027(p-1) = sigma(sigma(p-1)) = 2*(p-1). Subsequence of A256438. - Jaroslav Krizek, Mar 29 2015
From Jaroslav Krizek, Mar 17 2016: (Start)
Primes p such that A000203(A000010(p)) = sigma(phi(p)) is a prime.
Prime terms from A062514 and A270413, A270414, A270415 and A270416. (End)
From Jaroslav Krizek, Nov 27 2016: (Start)
Corresponding values of primes q are in A249761: 3, 7, 31, 131071, ...
Conjecture: subsequence of A256438 and A278741.
Conjecture: also primes p such that tau(p-1) is a prime q; corresponding values of primes q are 2, 3, 5, 17. (End)

Examples

			Prime 17 is in the sequence because sigma(17-1) = sigma(16) = 31 (prime).
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000000) | IsPrime(SumOfDivisors(p-1))]
    
  • Maple
    with(numtheory): A249759:=n->`if`(isprime(n) and isprime(sigma(n-1)), n, NULL): seq(A249759(n), n=1..6*10^5); # Wesley Ivan Hurt, Nov 14 2014
  • Mathematica
    Select[Range[10^5], PrimeQ[#]&& PrimeQ[DivisorSigma[1, # - 1]] &] (* Vincenzo Librandi, Nov 14 2014 *)
    Select[Prime[Range[7000]],PrimeQ[DivisorSigma[1,#-1]]&] (* Harvey P. Dale, Jun 14 2020 *)
  • PARI
    lista(nn) = {forprime(p=1, nn, if (isprime(sigma(p-1)), print1(p, ", ")););} \\ Michel Marcus, Nov 14 2014

Formula

a(n) = A249760(n) + 1.
Sigma(a(n)-1) = A249761(n).

A055638 Numbers k for which sigma(k^2) is prime.

Original entry on oeis.org

2, 3, 4, 5, 8, 17, 27, 41, 49, 59, 64, 71, 89, 101, 125, 131, 167, 169, 173, 256, 289, 293, 383, 512, 529, 677, 701, 729, 743, 761, 773, 827, 839, 841, 857, 911, 1091, 1097, 1163, 1181, 1193, 1217, 1373, 1427, 1487, 1559, 1583, 1709, 1811, 1847, 1849, 1931
Offset: 1

Views

Author

Robert G. Wilson v, Jun 07 2000

Keywords

Comments

sigma(n) is the sum of the divisors of n (A000203).
If sigma(x) is prime, then x=2 or x=p^(2m), an even power of a prime, cf. A023194. This sequence lists the values n = p^m such that sigma(n^2) is prime, i.e., sqrt( A023194 \ {2} ). The corresponding primes sigma(n^2)=A062700(n) are 1+p+...+p^(2m) = (p^(2m+1)-1)/(p-1), and any prime of that form (cf. A023195) corresponds to a term p^m is in this sequence. - M. F. Hasler, Oct 14 2014
This is a subsequence of A000961, see A248963 for its complement therein. - M. F. Hasler, Oct 19 2014
a(n) nearly always has digitsum of the form 2 mod 3. Specifically, 99.8% of the first 33733 entries examined conformed. The first exceptions are 3, 4, 27, 49, 64, 169, 256, 289, 529, 729. The exceptions (examined) appear to be integer powers themselves excepting the initial 3. Similarly, except for the initial 3, all entries of A023195 appear to have digitsum = 1 mod 3. - Bill McEachen, Mar 05 2017, Mar 20 2025
Number of terms < 10^k: 5, 13, 36, 137, 735, 4730, 33732, 253393, ..., . Robert G. Wilson v, Mar 09 2017
Primes in the sequence are A053182. - Thomas Ordowski, Nov 18 2017

Crossrefs

Cf. A023194 (sigma(n) is prime).
Cf. A023195 (primes of the form sigma(n)), A062700 (in order of appearance).

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(SumOfDivisors(n^2))]; // Vincenzo Librandi, Oct 18 2014
  • Mathematica
    Select[Range[2000], PrimeQ[DivisorSigma[1, #^2]] &]
  • PARI
    for(n=1,9999,isprime(sigma(n^2))&&print1(n",")) \\ M. F. Hasler, Oct 18 2014
    

Formula

a(n) = sqrt(A023194(n+1)).
Equal to A000961 \ A248963. - M. F. Hasler, Oct 19 2014

Extensions

Minor edits by M. F. Hasler, Oct 18 2014

A070801 Largest prime <= sigma(n): a(n) = prevprime(sigma(n)), where prevprime(n) = A007917(n), the largest prime less than or equal to n.

Original entry on oeis.org

3, 3, 7, 5, 11, 7, 13, 13, 17, 11, 23, 13, 23, 23, 31, 17, 37, 19, 41, 31, 31, 23, 59, 31, 41, 37, 53, 29, 71, 31, 61, 47, 53, 47, 89, 37, 59, 53, 89, 41, 89, 43, 83, 73, 71, 47, 113, 53, 89, 71, 97, 53, 113, 71, 113, 79, 89, 59, 167, 61, 89, 103, 127, 83, 139, 67, 113, 89
Offset: 2

Views

Author

Labos Elemer, May 08 2002

Keywords

Comments

Largest integer k such that A000203(k) <= A000203(n)+1. - Antti Karttunen, Nov 07 2017, after Benoit Cloitre's Mar 17 2002 comment in A007917.

Examples

			For n=100: sigma(100) = 217, prevprime(217) = 211 = a(100).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[PrimePi[DivisorSigma[1, w]]], {w, 2, 128}]
    Table[NextPrime[DivisorSigma[1, n] + 1, -1], {n, 2, 128}] (* Amiram Eldar, Mar 01 2024 *)
  • PARI
    A070801(n) = precprime(sigma(n)); \\ Antti Karttunen, Nov 07 2017
    
  • Scheme
    (define (A070801 n) (let ((s1 (+ 1 (A000203 n)))) (let loop ((k s1)) (if (<= (A000203 k) s1) k (loop (- k 1)))))) ;; (For code of A000203, see under that entry). Antti Karttunen, Nov 07 2017

Formula

a(n) = A000040(A000720(sigma(n))) = A007917(A000203(n)).
From Reinhard Zumkeller, Jun 26 2003: (Start)
A085379(n) <= a(n).
a(A085380(n)) = A085379(A085380(n)).
a(A085381(n)) > A085379(A085381(n)).
a(A023194(n)) = A000203(A023194(n)). (End)
Showing 1-10 of 89 results. Next