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.

Previous Showing 11-20 of 32 results. Next

A049847 a(n) = (2*n + 1 - prevprime(2*n+1))/2.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2n+1-NextPrime[2n+1,-1])/2,{n,2,100}] (* Harvey P. Dale, Jul 25 2015 *)

A336497 Numbers that cannot be written as a product of superfactorials A000178.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Gus Wiseman, Aug 03 2020

Keywords

Comments

First differs from A336426 in having 360.

Examples

			The sequence of terms together with their prime indices begins:
     3: {2}        22: {1,5}        39: {2,6}
     5: {3}        23: {9}          40: {1,1,1,3}
     6: {1,2}      25: {3,3}        41: {13}
     7: {4}        26: {1,6}        42: {1,2,4}
     9: {2,2}      27: {2,2,2}      43: {14}
    10: {1,3}      28: {1,1,4}      44: {1,1,5}
    11: {5}        29: {10}         45: {2,2,3}
    13: {6}        30: {1,2,3}      46: {1,9}
    14: {1,4}      31: {11}         47: {15}
    15: {2,3}      33: {2,5}        49: {4,4}
    17: {7}        34: {1,7}        50: {1,3,3}
    18: {1,2,2}    35: {3,4}        51: {2,7}
    19: {8}        36: {1,1,2,2}    52: {1,1,6}
    20: {1,1,3}    37: {12}         53: {16}
    21: {2,4}      38: {1,8}        54: {1,2,2,2}
		

Crossrefs

A093373 is the version for factorials, with complement A001013.
A336426 is the version for superprimorials, with complement A181818.
A336496 is the complement.
A000178 lists superfactorials.
A001055 counts factorizations.
A006939 lists superprimorials or Chernoff numbers.
A049711 is the minimum prime multiplicity in A000178(n).
A174605 is the maximum prime multiplicity in A000178(n).
A303279 counts prime factors (with multiplicity) of superprimorials.
A317829 counts factorizations of superprimorials.
A322583 counts factorizations into factorials.
A325509 counts factorizations of factorials into factorials.

Programs

  • Mathematica
    supfac[n_]:=Product[k!,{k,n}];
    facsusing[s_,n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsusing[Select[s,Divisible[n/d,#]&],n/d],Min@@#>=d&]],{d,Select[s,Divisible[n,#]&]}]];
    Select[Range[100],facsusing[Rest[Array[supfac,30]],#]=={}&]

A060846 Smallest prime > the n-th nontrivial power of a prime.

Original entry on oeis.org

5, 11, 11, 17, 29, 29, 37, 53, 67, 83, 127, 127, 131, 173, 251, 257, 293, 347, 367, 521, 541, 631, 733, 853, 967, 1031, 1361, 1373, 1693, 1861, 2053, 2203, 2203, 2213, 2411, 2819, 3137, 3491, 3727, 4099, 4493, 4919, 5051, 5333, 6247, 6563, 6863, 6899, 7927
Offset: 1

Views

Author

Labos Elemer, May 03 2001

Keywords

Examples

			78125=5^7 is followed by 78137.
		

Crossrefs

Programs

  • Mathematica
    NextPrime[Select[Range[10^4], !PrimeQ[#] && PrimePowerQ[#] &]] (* Amiram Eldar, Oct 04 2024 *)
  • PARI
    ispp(x) = !isprime(x) && isprimepower(x);
    lista(nn) = apply(x->nextprime(x), select(x->ispp(x), [1..nn])); \\ Michel Marcus, Aug 24 2019
    
  • Python
    from sympy import primepi, integer_nthroot, nextprime
    def A060846(n):
        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
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        return nextprime(bisection(f,n,n)) # Chai Wah Wu, Sep 15 2024

Formula

a(n) = nextprime(A025475(n+1)) = A007918(A025475(n+1)) = Min{p| p>A025475(n+1)}. [corrected by Michel Marcus, Aug 24 2019]

A175078 Number of iterations of {r mod (max prime p < r)} needed to reach 1 or 2 starting at r = n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2
Offset: 1

Views

Author

Jaroslav Krizek, Jan 23 2010

Keywords

Comments

a(123) = 3 (first occurrence of value 3), a(1357324) = 4 (first occurrence of value 4). I offer a prize of 100 liters of Pilsner Urquell to the discoverer of value of first occurrence of value 5. See A175071 (natural numbers m with result 1) and A175072 (natural numbers m with result 2). See A175077 = results 1 or 2 under iterations of {r mod (max prime p < r)} starting at r = n.
Essentially the same as A121561. [R. J. Mathar, Jan 28 2010]
The function r mod (max prime p < r), which appears in the definition, equals r - (max prime p < r) = A049711(r), because p < r < 2*p by Bertrand's postulate, where p is the largest prime less than r. - Pontus von Brömssen, Jul 31 2022

Examples

			a(123) = 3; iteration procedure for n = 123: 123 mod 113 = 10, 10 mod 7 = 3, 3 mod 2 = 1.
		

Crossrefs

Programs

  • Mathematica
    Array[-1 + Length@ NestWhileList[Mod[#, NextPrime[#, -1]] &, #, Not[1 <= # <= 2] &, 1, 120] &, 105] (* Michael De Vlieger, Oct 30 2017 *)
  • PARI
    A175078(n) = if(n<=2,0,1+A175078(n%precprime(n-1))); \\ Antti Karttunen, Oct 30 2017

Formula

a(n) = A121561(n-1) for n >= 2, because the functions that are iterated (A049711 here, A064722 in A121561) satisfies A049711(r) = A064722(r-1) + 1. - Pontus von Brömssen, Jul 31 2022

Extensions

Name shortened by Antti Karttunen, Oct 30 2017

A202111 a(n) = sigma(n) - p, where p is the largest prime < sigma(n).

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 5, 1, 1, 1, 2, 1, 2, 1, 1, 1, 5, 1, 1, 2, 1, 3, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 7, 1, 1, 5, 1, 1, 11, 4, 4, 1, 1, 1, 7, 1, 7, 1, 1, 1, 1, 1, 7, 1, 14, 1, 5, 1, 13, 7, 5, 1, 2, 1, 1, 11, 1, 7, 1, 1, 5, 8, 13, 1, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 5, 7, 1, 1, 4, 5, 6, 1, 5, 1, 11, 1, 5
Offset: 2

Views

Author

Michel Lagneau, Dec 11 2011

Keywords

Examples

			a(12) = sigma(12) - 23 = 28 - 23 = 5.
		

Crossrefs

Programs

Formula

a(n) = A049711(A000203(n)). - R. J. Mathar, Dec 13 2011

Extensions

More terms from Antti Karttunen, Nov 07 2017

A367035 Numbers k such that the greatest prime less than 2*k is less than twice the greatest prime less than k.

Original entry on oeis.org

8, 14, 18, 20, 32, 33, 38, 39, 44, 48, 60, 61, 62, 63, 68, 72, 73, 74, 80, 81, 98, 102, 103, 104, 105, 108, 109, 110, 111, 128, 138, 140, 150, 151, 152, 153, 158, 164, 165, 168, 182, 183, 194, 198, 200, 212, 213, 214, 215, 224, 228, 230, 242, 243, 258, 259, 260, 264, 265, 266, 267, 268, 269, 270
Offset: 1

Views

Author

Robert Israel, Dec 15 2023

Keywords

Comments

Numbers k such that A049711(2 * k) > 2 * A049711(k).

Examples

			a(3) = 18 is a term because the greatest prime < 18 is 17, the greatest prime < 2*18 = 36 is 31, and 31 < 2 * 17.
		

Crossrefs

Includes k+1 for k in A053176. Disjoint from A006254.

Programs

  • Maple
    select(k -> prevprime(2*k) < 2*prevprime(k), [$3..300]);
  • PARI
    isok(k) = precprime(2*k-1) < 2*precprime(k-1); \\ Michel Marcus, Dec 16 2023

A060845 Largest prime < a nontrivial power of a prime.

Original entry on oeis.org

3, 7, 7, 13, 23, 23, 31, 47, 61, 79, 113, 113, 127, 167, 241, 251, 283, 337, 359, 509, 523, 619, 727, 839, 953, 1021, 1327, 1367, 1669, 1847, 2039, 2179, 2179, 2207, 2399, 2803, 3121, 3469, 3719, 4093, 4483, 4909, 5039, 5323, 6229, 6553, 6857, 6883, 7919
Offset: 1

Views

Author

Labos Elemer, May 03 2001

Keywords

Examples

			78125=5^7 follows 78121
		

Crossrefs

Programs

  • Mathematica
    Take[NextPrime[#,-1]&/@Union[Flatten[Table[Prime[p]^n,{n,2,20},{p,25}]]], 50] (* Harvey P. Dale, Mar 26 2012 *)
  • PARI
    { m=1; for (n=1, 1000, m++; while(sigma(m)*eulerphi(m)*(1 - isprime(m)) <= (m - 1)^2, m++); write("b060845.txt", n, " ", precprime(m - 1)); ) } \\ Harry J. Smith, Jul 19 2009
    
  • Python
    from sympy import primepi, integer_nthroot, prevprime
    def A060845(n):
        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
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        return prevprime(bisection(f,n,n)) # Chai Wah Wu, Sep 15 2024

Formula

a(n) = prevprime[A025475(n)] = A007917[A025475(n)] = Max{p| p < A025475(n)}

A202090 a(n) = Fibonacci(n) - p, where p is the largest prime < Fibonacci(n).

Original entry on oeis.org

2, 1, 2, 2, 3, 2, 6, 5, 4, 4, 3, 4, 14, 5, 4, 2, 7, 4, 8, 17, 8, 14, 31, 14, 10, 37, 20, 26, 9, 20, 22, 11, 6, 12, 15, 32, 18, 17, 18, 16, 43, 24, 6, 17, 20, 26, 27, 20, 6, 9, 12, 34, 29, 36, 30, 47, 48, 4, 45, 32, 54, 27, 132, 22, 31, 4, 32, 11, 12, 60, 7, 76
Offset: 5

Views

Author

Michel Lagneau, Dec 11 2011

Keywords

Examples

			a(7) = Fibonacci(7) - 19 = 21-19 = 2;
a(11) = Fibonacci(11) - 83 = 89 - 83 = 6.
		

Crossrefs

Cf. A000045.

Programs

  • Maple
    A049711 := proc(n)
        n-prevprime(n) ;
    end proc:
    A202090 := proc(n)
        A049711(combinat[fibonacci](n) );
    end proc:
    seq(A202090(n),n=5..80) ; # R. J. Mathar, Dec 13 2011
  • Mathematica
    f[n_]:=Module[{nf=Fibonacci[n]},nf-NextPrime[nf,-1]];f/@Range[5,90]

Formula

a(n) = A049711(A000045(n)). - R. J. Mathar, Dec 13 2011

A338570 Primes p such that q*r mod p is prime, where q is the prime preceding p and r is the prime following p.

Original entry on oeis.org

11, 13, 19, 29, 31, 37, 47, 53, 59, 67, 73, 83, 89, 109, 127, 131, 151, 163, 173, 179, 211, 239, 251, 263, 269, 283, 307, 337, 359, 373, 383, 421, 433, 443, 449, 467, 479, 499, 503, 523, 541, 547, 569, 593, 599, 607, 653, 659, 677, 757, 787, 797, 829, 853, 877, 907, 919, 947, 967, 971, 977, 1033
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 02 2020

Keywords

Comments

Primes p such that -A049711(p)*A013632(p) mod p is prime.
Includes primes p such that p-8, p-2 and p+4 are also prime. Dickson's conjecture implies that there are infinitely many of these.

Examples

			a(3) = 19 is a member because 19 is prime, the previous and following primes are 17 and 23, and (17*23) mod 19 = 11 is prime.
		

Crossrefs

Programs

  • Maple
    R:= NULL: p:= 0: q:= 2: r:= 3:
    count:= 0:
    while count < 100 do
      p:= q; q:= r; r:= nextprime(r);
      if isprime(p*r mod q) then count:= count+1; R:= R, q;  fi;
    od:
    R;

A013635 a(n) = prevprime(n) + n.

Original entry on oeis.org

5, 7, 8, 11, 12, 15, 16, 17, 18, 23, 24, 27, 28, 29, 30, 35, 36, 39, 40, 41, 42, 47, 48, 49, 50, 51, 52, 59, 60, 63, 64, 65, 66, 67, 68, 75, 76, 77, 78, 83, 84, 87, 88, 89, 90, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 111, 112, 119, 120, 123, 124, 125, 126
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n + PreviousPrime(n): n in [3..70]]; // Vincenzo Librandi, Mar 30 2019
    
  • Maple
    [ seq(prevprime(i)+i,i=3..100) ];
  • Mathematica
    Table[n+NextPrime[n,-1],{n,3,60}] (* Harvey P. Dale, Mar 29 2019 *)
  • PARI
    a(n) = precprime(n-1) + n; \\ Michel Marcus, Mar 30 2019
Previous Showing 11-20 of 32 results. Next