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.

User: Michael B. Porter

Michael B. Porter's wiki page.

Michael B. Porter has authored 20 sequences. Here are the ten most recent ones:

A211397 Number of Sophie Germain primes less than 2^n.

Original entry on oeis.org

0, 2, 3, 4, 6, 8, 11, 18, 26, 39, 62, 103, 170, 281, 474, 834, 1464, 2555, 4493, 8051, 14499, 26375, 48024, 88175, 161833, 297544, 549330, 1018008, 1893255, 3527324, 6588118, 12334363, 23140567, 43497488, 81930886, 154587025, 292149120, 552997218, 1048340476, 1990145943, 3783145017
Offset: 1

Author

Michael B. Porter, Feb 08 2013

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 37; stable = Table[0, {nmax}];
    Do[s = 0;
      Do[If[And[PrimeQ[i], PrimeQ[2 i + 1]], s++], {i, 1, 2^n - 1}];
      Print[n, " ", s]; stable[[n]] = s, {n, 1, nmax}];
    stable (* Paul D. Beale, Sep 19 2014 *)
  • PARI
    a211397(n) = {local(r,i); r=0; for(i=1, 2^n-1, if(isprime(i)&&isprime(2*i+1), r=r+1)); r}

Extensions

a(30)-a(37) from Paul D. Beale, Sep 19 2014
a(38)-a(41) from Amiram Eldar, Jul 25 2025

A166376 Triangle in which n-th row (n>1) gives prime factors of n^2 + 1 with repetition.

Original entry on oeis.org

2, 5, 2, 5, 17, 2, 13, 37, 2, 5, 5, 5, 13, 2, 41, 101, 2, 61, 5, 29, 2, 5, 17, 197, 2, 113, 257, 2, 5, 29, 5, 5, 13, 2, 181, 401, 2, 13, 17, 5, 97, 2, 5, 53, 577, 2, 313, 677, 2, 5, 73, 5, 157, 2, 421, 17, 53, 2, 13, 37, 5, 5, 41
Offset: 1

Author

Michael B. Porter, Oct 13 2009

Keywords

Examples

			Since 13^2+1 = 170 = 2*5*17, the three terms 2, 5, 17 appear in the sequence.
		

Crossrefs

Programs

  • PARI
    row(n)={m=n^2+1;while(m!=1,p=factor(m)[1,1];print(p);m=m/p)}

A167189 Larger prime power associated with record gap in A167186.

Original entry on oeis.org

4, 8, 16, 25, 49, 121, 169, 243, 512, 1331, 1681, 2809, 4913, 6241, 7921, 9409, 14641, 22201, 36481, 44521, 49729, 94249, 185761, 226981, 271441, 292681, 452929, 619369, 769129, 822649, 1181569, 1852321, 5442889, 6265009, 8994001, 10883401, 17648401, 18722929
Offset: 1

Author

Michael B. Porter, Nov 01 2009

Keywords

Examples

			49 is in the sequence since the gap between it the previous prime power, 32, is greater than any previous gap.
		

Crossrefs

Smaller prime power is in A167188.
Record gaps between nonprime prime powers: A167186.
Gaps between nonprime prime powers: A053707.
List of nonprime prime powers: A025475.

Programs

  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    d_max=0;n_prev=1;for(n=2,32e6,if(isA025475(n),d=n-n_prev;if(d>d_max,print(n);d_max=d);n_prev=n))

A167188 Smaller prime power associated with record gap in A167186.

Original entry on oeis.org

1, 4, 9, 16, 32, 81, 128, 169, 361, 1024, 1369, 2401, 4489, 5329, 6889, 8192, 12769, 19683, 32768, 39601, 44521, 85849, 177241, 218089, 262144, 279841, 436921, 597529, 744769, 786769, 1142761, 1771561, 5340721, 6135529, 8826841, 10699441, 17447329, 18464209
Offset: 1

Author

Michael B. Porter, Nov 01 2009

Keywords

Examples

			32 is in the sequence since the gap between 32 and the next prime power, 49, is greater than any previous gap.
		

Crossrefs

Larger prime power: A167189.
Record gaps between nonprime prime powers: A167186.
Gaps between nonprime prime powers: A053707.
List of nonprime prime powers: A025475.

Programs

  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    d_max=0;n_prev=1;for(n=2,32e6,if(isA025475(n),d=n-n_prev;if(d>d_max,print(n_prev);d_max=d);n_prev=n))

A167186 Record gaps between nonprime prime powers.

Original entry on oeis.org

3, 4, 7, 9, 17, 40, 41, 74, 151, 307, 312, 408, 424, 912, 1032, 1217, 1872, 2518, 3713, 4920, 5208, 8400, 8520, 8892, 9297, 12840, 16008, 21840, 24360, 35880, 38808, 80760, 102168, 129480, 167160, 183960, 201072, 258720, 290760, 301242, 358848, 375468, 415920
Offset: 1

Author

Michael B. Porter, Oct 29 2009, Oct 31 2009, Nov 03 2009

Keywords

Examples

			17 is in the sequence since A025475(9) - A025475(8) = 49 - 32 = 17, and no previous gap is larger.
A025475(10) - A025475(9) = 64 - 49 = 15, but the previous gap is larger, so 15 is not in the sequence.
		

Crossrefs

List of nonprime prime powers: A025475.
Gaps between nonprime prime powers: A053707.
Record gaps between prime powers including primes: A121492.

Programs

  • Mathematica
    Join[{3},DeleteDuplicates[Differences[Select[Range[10^6],PrimePowerQ[#] && !PrimeQ[ #]&]], GreaterEqual]] (* Harvey P. Dale, Feb 28 2023 *)
  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    d_max=0;n_prev=1;for(n=2,32e6,if(isA025475(n),d=n-n_prev;n_prev=n;if(d>d_max,print(d);d_max=d)))

A167236 Larger prime power associated with gaps in A121492.

Original entry on oeis.org

2, 7, 16, 23, 37, 59, 97, 149, 211, 307, 907, 1151, 1361, 5623, 8501, 9587, 15727, 19661, 31469, 156007, 360749, 370373, 492227, 1349651, 1357333, 2010881, 4652507, 17051887, 20831533, 47326913, 122164969, 189695893, 191913031, 387096383, 436273291, 1294268779
Offset: 1

Author

Michael B. Porter, Nov 01 2009, Nov 03 2009

Keywords

Examples

			59 is in the sequence since 53 and 59 are consecutive prime powers with a difference of 6 and no smaller pair of consecutive prime powers differ by 6 or more.
		

Crossrefs

Size of gap: A121492
Smaller prime power (start of gap): A002540
Gaps between prime powers: A057820
List of prime powers: A000961

Programs

  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1)
    d_max=0;n_prev=1;for(n=2,1e6,if(isA000961(n),d=n-n_prev;if(d>d_max,print(n);d_max=d);n_prev=n))

Extensions

a(34) onwards from Jan Kristian Haugland, Oct 18 2024

A167185 Largest prime power <= n that is not prime.

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 4, 8, 9, 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 27, 27, 27, 27, 27, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
Offset: 1

Author

Michael B. Porter, Oct 29 2009

Keywords

Examples

			For a(14), 10, 12, and 14 are not prime powers, and 11 and 13 are prime powers but they are prime. Since 9 = 3^3 is a prime power, a(14) = 9.
		

Crossrefs

List of nonprime prime powers: A025475.
Next nonprime prime power: A167184.
Previous prime power including primes: A031218.

Programs

  • Mathematica
    Array[SelectFirst[Range[#, 1, -1], Or[And[! PrimeQ@ #, PrimePowerQ@ #], # == 1] &] &, 74] (* Michael De Vlieger, Jun 14 2017 *)
  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    A167185(n) = {local(m);m=n;while(!isA025475(m),m--);m}
    
  • Python
    from sympy import factorint
    def A167185(n): return next(filter(lambda m:len(f:=factorint(m))<=1 and max(f.values(),default=2)>1, range(n,0,-1))) # Chai Wah Wu, Oct 25 2024
  • Sage
    p = [n for n in (1..81) if (is_prime_power(n) or n == 1) and not is_prime(n)]
    r = [[p[i]]*(p[i+1] - p[i]) for i in (0..9)]
    print([y for x in r for y in x]) # Peter Luschny, Jun 14 2017
    

A167184 Smallest prime power >= n that is not prime.

Original entry on oeis.org

1, 4, 4, 4, 8, 8, 8, 8, 9, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 25, 27, 27, 32, 32, 32, 32, 32, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 81, 81, 81, 81, 81, 81, 81, 81
Offset: 1

Author

Michael B. Porter, Oct 29 2009

Keywords

Examples

			For a(12), 12, 14, and 15 are not prime powers, and 13 is a prime power but it is prime. Since 16 = 2^4 is a prime power, a(12) = 16.
		

Crossrefs

List of nonprime prime powers: A025475.
Previous nonprime prime power: A167185.
Next prime power including primes: A000015.

Programs

  • Mathematica
    Module[{ppwrs=Join[{1},Sort[Flatten[Table[Prime[Range[5]]^p,{p,2,10}]]]]}, Flatten[ Table[Select[ppwrs,#>=n&,1],{n,90}]]] (* Harvey P. Dale, Oct 06 2014 *)
  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    A167184(n) = {local(m);m=n;while(!isA025475(m),m++);m}
    
  • Python
    from itertools import count
    from sympy import factorint
    def A167184(n): return next(filter(lambda m:len(f:=factorint(m))<=1 and max(f.values(),default=2)>1, count(n))) # Chai Wah Wu, Oct 25 2024

A166061 19-rough numbers: positive integers that have no prime factors less than 19.

Original entry on oeis.org

1, 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

Author

Michael B. Porter, Oct 05 2009

Keywords

Comments

Or, positive integers relatively prime to 510510 = 2*3*5*7*11*13*17.

Examples

			437 = 19 * 23 is in the sequence since the two prime factors, 19 and 23, are not less than 19.
		

Crossrefs

Programs

Formula

a(n) = k*n + O(1) where k = 17017/3072 = 5.539388.... In particular, k*n - 31 < a(n) < k*n + 25. - Charles R Greathouse IV, Sep 24 2018

A166063 23-rough numbers: positive integers that have no prime factors less than 23.

Original entry on oeis.org

1, 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, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499
Offset: 1

Author

Michael B. Porter, Oct 05 2009

Keywords

Comments

Or, positive integers relatively prime to 9699690 = 2*3*5*7*11*13*17*19.
First composite term is 529 = 23^2.

Examples

			667 = 23 * 29 is in the sequence since the two prime factors, 23 and 29, are not less than 23.
		

Crossrefs

Cf. A332797 (subsequence).

Programs

  • Maple
    A166063 := proc(n)
        option remember;
        local a;
        if n =1 then
            1;
        else
            for a from procname(n-1)+1 do
                numtheory[factorset](a) ;
                if min(op(%)) >= 23 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A166063(n),n=1..80) ; # R. J. Mathar, Nov 05 2024
  • Mathematica
    Select[Range[500],FactorInteger[#][[1,1]]>22&] (* Harvey P. Dale, Nov 22 2010 *)
  • PARI
    isA166063(n) = gcd(n,9699690)==1 \\ Michael B. Porter, Oct 10 2009

Formula

a(n) = k*n + O(1) where k = 323323/55296 = 5.8471.... In particular, k*n - 51 < a(n) < k*n + 45. - Charles R Greathouse IV, Sep 21 2018
A166061 SETMINUS A332798 - R. J. Mathar, Nov 05 2024

Extensions

Additional terms provided provided by Harvey P. Dale, Nov 22 2010