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 32 results. Next

A135145 Values of m where A020482(m) != A060308(m-1).

Original entry on oeis.org

49, 61, 64, 74, 95, 104, 110, 125, 146, 151, 154, 163, 166, 173, 184, 199, 205, 209, 215, 229, 238, 244, 250, 259, 266, 269, 278, 293, 314, 320, 335, 346, 350, 355, 359, 364, 376, 385, 391, 394, 398, 403, 410, 419, 424, 427, 436, 439, 448, 451, 454, 460
Offset: 1

Views

Author

Harry J. Smith, Nov 20 2007

Keywords

Comments

Usually the greatest p with p,q both prime, p+q = 2m, is equal to the largest prime <= 2m-2, but not always. These are the exceptions.
Almost all natural numbers are in the sequence so the above comment is misleading in general, and only fitting for small numbers. - Jens Kruse Andersen, Jul 13 2014

Crossrefs

Programs

  • Mathematica
    a2[n_] := {p, q} /. {ToRules @ Reduce[p+q == 2*n, {p, q}, Primes]} // Max; a8[n_] := Max[FactorInteger[(2*n)!/n!^2]]; Select[Range[500], a2[#] != a8[#-1]&] (* Jean-François Alcover, Dec 19 2013 *)
  • PARI
    for(m=2, 1000, p=precprime(2*m-2); if(!isprime(2*m-p), print1(m", "))) \\ Jens Kruse Andersen, Jul 12 2014

A244207 Numbers 2m such that A020482(m) != A060308(m-1).

Original entry on oeis.org

98, 122, 128, 148, 190, 208, 220, 250, 292, 302, 308, 326, 332, 346, 368, 398, 410, 418, 430, 458, 476, 488, 500, 518, 532, 538, 556, 586, 628, 640, 670, 692, 700, 710, 718, 728, 752, 770, 782, 788, 796, 806, 820, 838, 848, 854, 872, 878, 896, 902, 908, 920
Offset: 1

Views

Author

Ivan Panchenko, Jun 22 2014

Keywords

Comments

Usually the greatest p with p, q both prime, p + q = 2m, is equal to the largest prime <= 2m - 2, but not always. These are the exceptions, called "b numbers" ("b-Zahlen") by Nils Johan Pipping.
Almost all numbers are in the sequence. Only the beginning of the sequence is sparse. - Jens Kruse Andersen, Jul 12 2014
Let p be the smallest prime < 2n such that 2n-p is prime, and let r < 2n be the smallest odd nonprime > 1 such that 2n-r is prime; this sequence lists the numbers 2n for which r < p. - David James Sycamore, Jan 14 2019

Examples

			From _David James Sycamore_, Jan 14 2019: (Start)
98 is a term because (see 3rd comment above) p = 11 and r = 9.
128 is a term because then p = 19 and r = 15.
908 is a term because then p = 31 and r = 21. (End)
		

Crossrefs

Cf. A020482, A060308. Equals twice A135145.

Programs

  • PARI
    for(m=2, 1000, p=precprime(2*m-2); if(!isprime(2*m-p), print1(2*m", "))) \\ Jens Kruse Andersen, Jul 12 2014

A135143 Values of A020482 where A020482(m) != A060308(m-1).

Original entry on oeis.org

79, 109, 109, 137, 179, 197, 197, 239, 281, 283, 277, 313, 313, 317, 349, 379, 397, 401, 419, 439, 463, 457, 487, 499, 521, 521, 509, 569, 617, 617, 659, 673, 683, 691, 701, 709, 739, 757, 769, 769, 773, 787, 809, 827, 829, 823, 859, 859, 883, 883, 877
Offset: 1

Views

Author

Harry J. Smith, Nov 20 2007

Keywords

Comments

Usually the greatest p with p,q both prime, p+q = 2m, is equal to the largest prime <= 2m-2, but not always. These are the exceptions.

Crossrefs

A135144 Values of A060308 where A020482(m) != A060308(m-1).

Original entry on oeis.org

89, 113, 113, 139, 181, 199, 211, 241, 283, 293, 293, 317, 317, 337, 359, 389, 401, 409, 421, 449, 467, 479, 491, 509, 523, 523, 547, 577, 619, 631, 661, 683, 691, 701, 709, 719, 743, 761, 773, 773, 787, 797, 811, 829, 839, 839, 863, 863, 887, 887, 887
Offset: 1

Views

Author

Harry J. Smith, Nov 20 2007

Keywords

Comments

Usually the greatest p with p,q both prime, p+q = 2m, is equal to the largest prime <= 2m-2, but not always. These are the exceptions.

Crossrefs

A378020 a(n) = pi(A020482(n)) - pi(A020481(n)).

Original entry on oeis.org

0, 0, 1, 2, 1, 3, 4, 3, 5, 6, 5, 7, 6, 5, 8, 9, 8, 7, 10, 9, 11, 12, 11, 13, 12, 11, 14, 13, 12, 15, 16, 15, 14, 17, 16, 18, 19, 18, 17, 20, 19, 21, 20, 19, 22, 21, 20, 14, 23, 22, 24, 25, 24, 26, 27, 26, 28, 27, 26, 23, 25, 24, 21, 29, 28, 30, 29, 28, 31, 32, 31, 30, 28, 29, 33, 34
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Module[{p = 2, q},
      While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
       p = NextPrime[p]]; PrimePi[q] - PrimePi[p]], {n, 2, 100}]

Formula

a(n) = A377972(n) - A377758(n).

A005843 The nonnegative even numbers: a(n) = 2n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 0

Views

Author

Keywords

Comments

-2, -4, -6, -8, -10, -12, -14, ... are the trivial zeros of the Riemann zeta function. - Vivek Suri (vsuri(AT)jhu.edu), Jan 24 2008
If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-2) is the number of 2-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
A134452(a(n)) = 0; A134451(a(n)) = 2 for n > 0. - Reinhard Zumkeller, Oct 27 2007
Omitting the initial zero gives the number of prime divisors with multiplicity of product of terms of n-th row of A077553. - Ray Chandler, Aug 21 2003
A059841(a(n))=1, A000035(a(n))=0. - Reinhard Zumkeller, Sep 29 2008
(APSO) Alternating partial sums of (a-b+c-d+e-f+g...) = (a+b+c+d+e+f+g...) - 2*(b+d+f...), it appears that APSO(A005843) = A052928 = A002378 - 2*(A116471), with A116471=2*A008794. - Eric Desbiaux, Oct 28 2008
A056753(a(n)) = 1. - Reinhard Zumkeller, Aug 23 2009
Twice the nonnegative numbers. - Juri-Stepan Gerasimov, Dec 12 2009
The number of hydrogen atoms in straight-chain (C(n)H(2n+2)), branched (C(n)H(2n+2), n > 3), and cyclic, n-carbon alkanes (C(n)H(2n), n > 2). - Paul Muljadi, Feb 18 2010
For n >= 1; a(n) = the smallest numbers m with the number of steps n of iterations of {r - (smallest prime divisor of r)} needed to reach 0 starting at r = m. See A175126 and A175127. A175126(a(n)) = A175126(A175127(n)) = n. Example (a(4)=8): 8-2=6, 6-2=4, 4-2=2, 2-2=0; iterations has 4 steps and number 8 is the smallest number with such result. - Jaroslav Krizek, Feb 15 2010
For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is not integer. A040001(a(n)) > 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
Union of A179082 and A179083. - Reinhard Zumkeller, Jun 28 2010
a(k) is the (Moore lower bound on and the) order of the (k,4)-cage: the smallest k-regular graph having girth four: the complete bipartite graph with k vertices in each part. - Jason Kimberley, Oct 30 2011
For n > 0: A048272(a(n)) <= 0. - Reinhard Zumkeller, Jan 21 2012
Let n be the number of pancakes that have to be divided equally between n+1 children. a(n) is the minimal number of radial cuts needed to accomplish the task. - Ivan N. Ianakiev, Sep 18 2013
For n > 0, a(n) is the largest number k such that (k!-n)/(k-n) is an integer. - Derek Orr, Jul 02 2014
a(n) when n > 2 is also the number of permutations simultaneously avoiding 213, 231 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl Aug 07 2014
It appears that for n > 2, a(n) = A020482(n) + A002373(n), where all sequences are infinite. This is consistent with Goldbach's conjecture, which states that every even number > 2 can be expressed as the sum of two prime numbers. - Bob Selcoe, Mar 08 2015
Number of partitions of 4n into exactly 2 parts. - Colin Barker, Mar 23 2015
Number of neighbors in von Neumann neighborhood. - Dmitry Zaitsev, Nov 30 2015
Unique solution b( ) of the complementary equation a(n) = a(n-1)^2 - a(n-2)*b(n-1), where a(0) = 1, a(1) = 3, and a( ) and b( ) are increasing complementary sequences. - Clark Kimberling, Nov 21 2017
Also the maximum number of non-attacking bishops on an (n+1) X (n+1) board (n>0). (Cf. A000027 for rooks and queens (n>3), A008794 for kings or A030978 for knights.) - Martin Renner, Jan 26 2020
Integer k is even positive iff phi(2k) > phi(k), where phi is Euler's totient (A000010) [see reference De Koninck & Mercier]. - Bernard Schott, Dec 10 2020
Number of 3-permutations of n elements avoiding the patterns 132, 213, 312 and also number of 3-permutations avoiding the patterns 213, 231, 321. See Bonichon and Sun. - Michel Marcus, Aug 20 2022
a(n) gives the y-value of the integral solution (x,y) of the Pellian equation x^2 - (n^2 + 1)*y^2 = 1. The x-value is given by 2*n^2 + 1 (see Tattersall). - Stefano Spezia, Jul 24 2025

Examples

			G.f. = 2*x + 4*x^2 + 6*x^3 + 8*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 16*x^8 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 28.
  • J.-M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 529a pp. 71 and 257, Ellipses, 2004, Paris.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 256.

Crossrefs

a(n)=2*A001477(n). - Juri-Stepan Gerasimov, Dec 12 2009
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), this sequence (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A231200 (boustrophedon transform).

Programs

Formula

G.f.: 2*x/(1-x)^2.
E.g.f.: 2*x*exp(x). - Geoffrey Critzer, Aug 25 2012
G.f. with interpolated zeros: 2x^2/((1-x)^2 * (1+x)^2); e.g.f. with interpolated zeros: x*sinh(x). - Geoffrey Critzer, Aug 25 2012
Inverse binomial transform of A036289, n*2^n. - Joshua Zucker, Jan 13 2006
a(0) = 0, a(1) = 2, a(n) = 2a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
a(n) = Sum_{k=1..n} floor(6n/4^k + 1/2). - Vladimir Shevelev, Jun 04 2009
a(n) = A034856(n+1) - A000124(n) = A000217(n) + A005408(n) - A000124(n) = A005408(n) - 1. - Jaroslav Krizek, Sep 05 2009
a(n) = Sum_{k>=0} A030308(n,k)*A000079(k+1). - Philippe Deléham, Oct 17 2011
Digit sequence 22 read in base n-1. - Jason Kimberley, Oct 30 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Dec 23 2011
a(n) = 2*n = Product_{k=1..2*n-1} 2*sin(Pi*k/(2*n)), n >= 0 (undefined product := 1). See an Oct 09 2013 formula contribution in A000027 with a reference. - Wolfdieter Lang, Oct 10 2013
From Ilya Gutkovskiy, Aug 19 2016: (Start)
Convolution of A007395 and A057427.
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2 = (1/2)*A002162 = (1/10)*A016655. (End)
From Bernard Schott, Dec 10 2020: (Start)
Sum_{n>=1} 1/a(n)^2 = Pi^2/24 = A222171.
Sum_{n>=1} (-1)^(n+1)/a(n)^2 = Pi^2/48 = A245058. (End)

A020481 Least p with p, q both prime, p+q = 2n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Essentially the same as A002373, which does not have the a(2) term. - T. D. Noe, Sep 24 2007
a(n) = A171637(n,1). - Reinhard Zumkeller, Mar 03 2014
Conjecture: a(n) ~ O(n^1/2). - Jon Perry, Apr 29 2014

Crossrefs

Cf. A020482.

Programs

  • Haskell
    a020481 n = head [p | p <- a000040_list, a010051' (2 * n - p) == 1]
    -- Reinhard Zumkeller, Jul 07 2014, Mar 03 2014
    
  • Mathematica
    a[n_] := For[p = 2, True, p = NextPrime[p], If[PrimeQ[2n-p], Return[p]]];
    Table[a[n], {n, 2, 103}] (* Jean-François Alcover, Jul 31 2018  *)
  • PARI
    A020481(n) = {local(np);np=1;while(!isprime(2*n-prime(np)),np++);prime(np)} \\ Michael B. Porter, Dec 11 2009
    
  • PARI
    A020481(n)=forprime(p=1,n,isprime(2*n-p)&return(p)) \\ M. F. Hasler, Sep 18 2012
    
  • Python
    from sympy import isprime, primerange
    def A020481(n): return next(filter(lambda p:isprime((n<<1)-p),primerange(2*n))) # Chai Wah Wu, Nov 19 2024

Formula

a(n) = n - A047949(n). - Jason Kimberley, Oct 09 2012

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

Views

Author

Labos Elemer, Mar 27 2001

Keywords

Comments

a(n) is the smallest k such that C(2n,n) divides k!. - Benoit Cloitre, May 30 2002
a(n) is largest prime factor of C(2n,n) = (2n)!/(n!)^2. - Alexander Adamchuk, Jul 11 2006
a(n) is also the largest prime in the interval [n,2n]. - Peter Luschny, Mar 04 2011
Odd prime p repeats (q-p)/2 times, where q > p is the next prime. In particular, every lesser of twin primes (A001359) occurs 1 time, every lesser more than 3 of cousin primes (A023200) occurs 2 times, etc. - Vladimir Shevelev, Mar 12 2012

Examples

			n=1, 2n=2, p(1) = 2 = a(1) is the largest prime not exceeding 2.
		

Crossrefs

Apart from initial term, same as A060265.
Cf. A007917 (largest prime <= n), A005843 (2n).

Programs

Formula

a(n) = Max[FactorInteger[(2n)!/(n!)^2]]. - Alexander Adamchuk, Jul 11 2006
a(n) = A006530(A000142(2*n)) and a(n) = A006530(A056040(2*n)). - Peter Luschny, Mar 04 2011
a(n) ~ 2*n as n tends to infinity. - Vladimir Shevelev, Mar 12 2012
a(n) = A007917(A005843(n)) = A226078(n, A067434(n)). - Reinhard Zumkeller, May 25 2013

Extensions

More terms from Alexander Adamchuk, Jul 11 2006

A060264 First prime after 2n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Comments

Conjecture: for n > 2, this is the least prime p such that 1^2, 2^2, 3^2, ..., n^2 are distinct mod p. Checked to 10^4. - Charles R Greathouse IV, Dec 03 2022

Crossrefs

Programs

Formula

a(n) = A151800(2*n). - Reinhard Zumkeller, Nov 15 2013

A060265 Largest prime less than 2n.

Original entry on oeis.org

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: 2

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Comments

a(n) = A007917(2*n) = A255313(n-1,1) = A255316(n-1,1) = A006530(A255427(n)). - Reinhard Zumkeller, Feb 22 2015

Crossrefs

Apart from initial term, same as A060308.

Programs

  • Haskell
    a060265 = a007917 . (* 2)  -- Reinhard Zumkeller, Feb 22 2015
  • Maple
    seq (prevprime(2*i+1), i=2..256);
  • Mathematica
    Table[NextPrime[2 n, -1], {n, 2, 66}] (* Michael De Vlieger, Jul 04 2016 *)
  • PARI
    a(n) = precprime(2*n-1) \\ Harry J. Smith, Jul 03 2009
    
Showing 1-10 of 32 results. Next