1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -2, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -2, 1, 1, -2, 1, 1, 1, -1, 1, -1, -4, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -6, -1, 1, -1, 1, -1, 1
Offset: 1
Array starts:
n\k | 1 2 3 4 5 6 7 8 9 10
----+-----------------------------------------------------
1 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
2 | 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ...
3 | 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, ...
4 | 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ...
5 | 1, 1, 1, 1, -4, 1, 1, 1, 1, -4, ...
6 | 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, ...
7 | 1, 1, 1, 1, 1, 1, -6, 1, 1, 1, ...
8 | 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ...
9 | 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, ...
10 | 1, -1, 1, -1, -4, -1, 1, -1, 1, 4, ...
A006992
Bertrand primes: a(n) is largest prime < 2*a(n-1) for n > 1, with a(1) = 2.
Original entry on oeis.org
2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, 2503, 5003, 9973, 19937, 39869, 79699, 159389, 318751, 637499, 1274989, 2549951, 5099893, 10199767, 20399531, 40799041, 81598067, 163196129, 326392249, 652784471, 1305568919, 2611137817
Offset: 1
- Martin Aigner and Günter M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 7.
- Martin Griffiths, The Backbone of Pascal's Triangle, United Kingdom Mathematics Trust (2008), page 115. [From Martin Griffiths, Mar 28 2009]
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 344.
- Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 189.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Robert G. Wilson v, Table of n, a(n) for n = 1..1001 (first 100 terms from T. D. Noe)
- Paul Erdős, Beweis eines Satzes von Tschebyschef (in German), Acta Litt. Sci. Szeged, Vol. 5 (1932), pp. 194-198.
- Paul Erdős, A theorem of Sylvester and Schur, J. London Math. Soc., Vol. 9 (1934), pp. 282-288.
- Srinivasa Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., Vol. 11 (1919), pp. 181-182.
- Vladimir Shevelev, Ramanujan and Labos primes, their generalizations, and classifications of primes, J. Integer Seq., Vol. 15 (2012) Article 12.5.4.
- Jonathan Sondow, Ramanujan primes and Bertrand's postulate, arXiv:0907.5232 [math.NT], 2009-2010.
- Jonathan Sondow, Ramanujan primes and Bertrand's postulate, Amer. Math. Monthly, Vol. 116, No. 7 (2009), pp. 630-635.
- Jonathan Sondow and Eric Weisstein, MathWorld: Bertrand's Postulate.
- Eric Weisstein's World of Mathematics, B2 Sequence.
- Robert G. Wilson, V, Letter to N. J. A. Sloane, Oct. 1993.
-
a006992 n = a006992_list !! (n-1)
a006992_list = iterate (a007917 . (* 2)) 2
-- Reinhard Zumkeller, Sep 17 2014
-
A006992 := proc(n) option remember; if n=1 then 2 else prevprime(2*A006992(n-1)); fi; end;
-
bertrandPrime[1] = 2; bertrandPrime[n_] := NextPrime[ 2*a[n - 1], -1]; Table[bertrandPrime[n], {n, 40}]
(* Second program: *)
NestList[NextPrime[2#, -1] &, 2, 40] (* Harvey P. Dale, May 21 2012 *)
k = 3; a[n_] := If[GCD[n,k] > 1 && GCD[n, k] < n, -1, GCD[n, k]]; Select[Differences@Table[k = a[n] + k, {n, 2611137817}], # > 1 &] (* Manuel Valdivia, Jan 13 2015 *)
-
print1(t=2);for(i=2,60,print1(", "t=precprime(2*t))) \\ Charles R Greathouse IV, Apr 01 2013
-
from sympy import prevprime
l = [2]
for i in range(1, 51):
l.append(prevprime(2 * l[i - 1]))
print(l) # Indranil Ghosh, Apr 26 2017
A049711
a(n) = n - prevprime(n).
Original entry on oeis.org
1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6
Offset: 3
-
A049711 := n-> n-prevprime(n);
-
PrevPrim[n_] := Block[ {k = n - 1}, While[ !PrimeQ[k], k-- ]; Return[k]]; Table[ n - PrevPrim[n], {n, 3, 100} ]
Array[#-NextPrime[#,-1]&,100,3] (* Harvey P. Dale, Dec 07 2011 *)
-
A049711(n)=n-precprime(n-1) \\ M. F. Hasler, Sep 09 2015
A013603
Difference between 2^n and the nearest prime less than or equal to 2^n.
Original entry on oeis.org
0, 1, 1, 3, 1, 3, 1, 5, 3, 3, 9, 3, 1, 3, 19, 15, 1, 5, 1, 3, 9, 3, 15, 3, 39, 5, 39, 57, 3, 35, 1, 5, 9, 41, 31, 5, 25, 45, 7, 87, 21, 11, 57, 17, 55, 21, 115, 59, 81, 27, 129, 47, 111, 33, 55, 5, 13, 27, 55, 93, 1, 57, 25, 59, 49, 5, 19, 23, 19, 35, 231, 93, 69, 35, 97, 15
Offset: 1
James Kilfiger (mapdn(AT)csv.warwick.ac.uk)
Equivalent sequence for next prime:
A092131.
-
seq(2^i-prevprime(2^i),i=2..100);
-
{0} ~Join~ Array[With[{c = 2^#}, c - NextPrime[c, -1]] &, 80, 2] (* Harvey P. Dale, Jul 23 2013 *)
Table[2^n - Prime[PrimePi[2^n]], {n, 80}] (* Alonso del Arte, Dec 10 2016 *)
-
a(n) = 2^n - precprime(2^n); \\ Michel Marcus, Apr 04 2020
A060308
Largest prime <= 2n.
Original entry on oeis.org
2, 3, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 23, 29, 31, 31, 31, 37, 37, 41, 43, 43, 47, 47, 47, 53, 53, 53, 59, 61, 61, 61, 67, 67, 71, 73, 73, 73, 79, 79, 83, 83, 83, 89, 89, 89, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 113, 113, 113, 113, 113, 127, 127, 131
Offset: 1
n=1, 2n=2, p(1) = 2 = a(1) is the largest prime not exceeding 2.
Apart from initial term, same as
A060265.
-
a060308 = a007917 . a005843 -- Reinhard Zumkeller, May 25 2013
-
[NthPrime(#PrimesUpTo(2*n)): n in [2..100]]; // Vincenzo Librandi, Nov 25 2015
-
seq (prevprime(2*i+1), i=1..256);
seq(max(op(select(isprime,[$n..2*n]))),n=1..66); # Peter Luschny, Mar 04 2011
-
Table[Max[FactorInteger[(2n)!/(n!)^2]],{n,1,100}] (* Alexander Adamchuk, Jul 11 2006 *)
NextPrime[2*Range[80]+1,-1] (* Harvey P. Dale, Apr 23 2017 *)
-
a(n)=precprime(2*n) \\ Charles R Greathouse IV, May 24 2013
A104350
Partial products of largest prime factors of numbers <= n.
Original entry on oeis.org
1, 2, 6, 12, 60, 180, 1260, 2520, 7560, 37800, 415800, 1247400, 16216200, 113513400, 567567000, 1135134000, 19297278000, 57891834000, 1099944846000, 5499724230000, 38498069610000, 423478765710000, 9740011611330000
Offset: 1
- Gérald Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, Publ. Inst. Elie Cartan, Vol. 13, Nancy, 1990.
Cf.
A000142,
A002110,
A006530,
A007947,
A020639,
A046670,
A072486,
A076928,
A104351,
A104355,
A104357,
A104365.
-
a104350 n = a104350_list !! (n-1)
a104350_list = scanl1 (*) a006530_list
-- Reinhard Zumkeller, Apr 10 2014
-
A104350[n_] := Product[FactorInteger[k][[-1, 1]], {k, 1, n}]; Table[A104350[n], {n, 30}] (* G. C. Greubel, May 09 2017 *)
FoldList[Times,Table[FactorInteger[n][[-1,1]],{n,30}]] (* Harvey P. Dale, May 25 2023 *)
-
gpf(n)=my(f=factor(n)[,1]); f[#f]
a(n)=prod(i=2,n,gpf(i)) \\ Charles R Greathouse IV, Apr 29 2015
-
first(n)=my(v=vector(n,i,1)); forfactored(k=2,n, v[k[1]]=v[k[1]-1]*vecmax(k[2][,1])); v \\ Charles R Greathouse IV, May 10 2017
A053001
Largest prime < n^2.
Original entry on oeis.org
3, 7, 13, 23, 31, 47, 61, 79, 97, 113, 139, 167, 193, 223, 251, 283, 317, 359, 397, 439, 479, 523, 571, 619, 673, 727, 773, 839, 887, 953, 1021, 1087, 1153, 1223, 1291, 1367, 1439, 1511, 1597, 1669, 1759, 1847, 1933, 2017, 2113, 2207, 2297, 2399, 2477, 2593
Offset: 2
- J. R. Goldman, The Queen of Mathematics, 1998, p. 82.
-
a053001 = a007917 . a000290 -- Reinhard Zumkeller, Jun 07 2015
-
[seq(prevprime(i^2),i=2..100)];
-
Table[Prime[PrimePi[n^2]], {n, 2, 60}] (* Stefan Steinerberger, Apr 01 2006 *)
Table[NextPrime[n^2, -1], {n, 2, 60}] (* Jean-François Alcover, Oct 14 2013 *)
-
a(n) = precprime(n^2) \\ Michel Marcus, Oct 14 2013
-
from sympy import prevprime
def a(n): return prevprime(n*n)
print([a(n) for n in range(2, 52)]) # Michael S. Branicky, Jul 29 2022
Comments