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

A005383 Primes p such that (p+1)/2 is prime.

Original entry on oeis.org

3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253
Offset: 1

Views

Author

Keywords

Comments

Also, n such that sigma(n)/2 is prime. - Joseph L. Pe, Dec 10 2001; confirmed by Vladeta Jovovic, Dec 12 2002
Primes that are followed by twice a prime, i.e., are followed by a semiprime. (For primes followed by two semiprimes, see A036570.) - Zak Seidov, Aug 03 2013, Dec 31 2015
If A005382(n) is in A168421 then a(n) is a twin prime with a Ramanujan prime, A104272(k) = a(n) - 2. - John W. Nicholson, Jan 07 2016
Starting with 13 all terms are congruent to 1 mod 12. - Zak Seidov, Feb 16 2017
Numbers n such that both n and n+12 are terms are 61, 661, 1201, 4261, 5101, 6121, 6361 (all congruent to 1 mod 60). - Zak Seidov, Mar 16 2017
Primes p for which there exists a prime q < p such that 2q == 1 (mod p). Proof: q = (p + 1)/2. - David James Sycamore, Nov 10 2018
Prime numbers n such that phi(sigma(2n)) = phi(2n), excluding n=3 and n=5; as well as phi(sigma(3n)) = phi(3n), excluding n=3 only. - Richard R. Forberg, Dec 22 2020

Examples

			Both 3 and (3+1)/2 = 2 are primes, both 5 and (5+1)/2 = 3 are primes. - _Zak Seidov_, Nov 19 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A subsequence of A000040 which has A036570 as subsequence.

Programs

  • Haskell
    a005383 n = a005383_list !! (n-1)
    a005383_list = [p | p <- a065091_list, a010051 ((p + 1) `div` 2) == 1]
    -- Reinhard Zumkeller, Nov 06 2012
    
  • MATLAB
    LIMIT = 8000 % Find all members of A005383 less than LIMIT A = primes(LIMIT); n = length(A); %n is number of primes less than LIMIT B = 2*A - 1; C = ones(n, 1)*A; %C is an n X n matrix, with C(i, j) = j-th prime D = B'*ones(1, n); %D is an n X n matrix, with D(i, j) = (i-th prime)*2 - 1 [i, j] = find(C == D); A(j)
    
  • Magma
    [n: n in [1..3300] | IsPrime(n) and IsPrime((n+1) div 2) ]; // Vincenzo Librandi, Sep 25 2012
    
  • Maple
    for n to 300 do
      X := ithprime(n);
    Y := ithprime(n+1);
    Z := 1/2 mod Y;
      if isprime(Z) then print(Y);
    end if:
    end do:
    # David James Sycamore, Nov 11 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(# + 1)/2] &] (* Zak Seidov, Nov 19 2012 *)
  • PARI
    A005383_list(n) = select(m->isprime(m\2+1),primes(n)[2..n]) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Python
    from sympy import isprime
    [n for n in range(3, 5000) if isprime(n) and isprime((n + 1)//2)]
    # Indranil Ghosh, Mar 17 2017
    
  • Sage
    [n for n in prime_range(3, 1000) if is_prime((n + 1) // 2)]
    # F. Chapoton, Dec 17 2019

Formula

a(n) = A129521(n)/A005382(n). - Reinhard Zumkeller, Apr 19 2007
A000035(a(n))*A010051(a(n))*A010051((a(n)+1)/2) = 1. - Reinhard Zumkeller, Nov 06 2012
a(n) = 2*A005382(n) - 1. - Zak Seidov, Nov 19 2012
a(n) = A005382(n) + phi(A005382(n)) = A005382(n) + A000010(A005382(n)). - Torlach Rush, Mar 10 2014

Extensions

More terms from David Wasserman, Jan 18 2002
Name changed by Jianing Song, Nov 27 2021

A017281 a(n) = 10*n + 1.

Original entry on oeis.org

1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 201, 211, 221, 231, 241, 251, 261, 271, 281, 291, 301, 311, 321, 331, 341, 351, 361, 371, 381, 391, 401, 411, 421, 431, 441, 451, 461, 471, 481, 491, 501, 511, 521, 531
Offset: 0

Views

Author

Keywords

Comments

Equals [1, 2, 3, ...] convolved with [1, 9, 0, 0, 0, ...]. - Gary W. Adamson, May 30 2009
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=10, (i>1), A[i,i-1] = -1, and A[i,j]=0 otherwise. Then, for n>=2, a(n-1) = -coeff(charpoly(A,x),x^(n-1)). - Milan Janjic, Feb 21 2010
Positive integers with last decimal digit = 1. - Wesley Ivan Hurt, Jun 17 2015
Also the number of (not necessarily maximal) cliques in the 2n-crossed prism graph. - Eric W. Weisstein, Nov 29 2017
From Martin Renner, May 28 2024: (Start)
Also number of squares in a grid cross with equally long arms and a width of two points (cf. A017113), e.g. for n = 2 there are nine squares of size 1 unit of area, four of size 2, two of size 5, four of size 8 and two of size 13, thus a total of 21 squares.
· · · · · · · · * ·
· · · · * · * · · ·
* * · · · · · · * · · · · · · · * · · · · · · · · · · · · *
* * · · · · · * · * · · · * · · · · * · · · * · * · · · · ·
· · * · · * · · · ·
· · · · · · * · · *
The possible areas of the squares are given by ceiling(k^2/2) for 1 <= k <= 2*n+1, cf. A000982. In general, there are 4*n + 1 squares with one unit area to be found in the cross, cf. A016813, for n > 0 always four squares of even area and two squares of odd area > 1. (End)

Crossrefs

Cf. A093645 (column 1).
Subsequence of A034709, together with A017293, A017329, A139222, A139245, A139249, A139264, A139279 and A139280.
Cf. A030430 (primes).
Cf. A272914, first comment. [Bruno Berselli, May 26 2016]

Programs

Formula

G.f.: (1+9*x)/(1-x)^2.
a(n) = 20*n - a(n-1) - 8, with a(0)=1. - Vincenzo Librandi, Nov 20 2010
a(n) = 2*a(n-1) - a(n-2), for n > 2. - Wesley Ivan Hurt, Jun 17 2015
E.g.f.: (1 + 10*x)*exp(x). - G. C. Greubel, Sep 18 2019

A067756 Prime hypotenuses of Pythagorean triangles with a prime leg.

Original entry on oeis.org

5, 13, 61, 181, 421, 1741, 1861, 2521, 3121, 5101, 8581, 9661, 16381, 19801, 36721, 60901, 71821, 83641, 100801, 106261, 135721, 161881, 163021, 199081, 205441, 218461, 273061, 282001, 337021, 388081, 431521, 491041, 531481, 539761, 552301
Offset: 1

Views

Author

Henry Bottomley, Jan 31 2002

Keywords

Comments

Apart from the first two terms, every term is congruent to 1 modulo 60 and is of the form 450k^2 +- 30k + 1 or 450k^2 +- 330k + 61 for some k.
Every term of the sequence after the second is a prime p congruent to 1 (mod 60), i.e., for n > 2, a(n) is a subsequence of A088955. The Pythagorean triple is {sqrt(2p-1), p-1, p}. - Lekraj Beedassy, Mar 12 2002
Primes p such that 2*p-1 is the square of a prime. - Robert Israel, Sep 16 2014
Primes p of the form ((q+1)/2)^2 + ((q-1)/2)^2, where q is a prime; then q belongs to A048161. - Thomas Ordowski, May 22 2015
The other (i.e., long) leg of the Pythagorean triangle is p-1. - Zak Seidov, Oct 30 2015

Examples

			For a(1)=5, the right triangle is 3, 4, 5 with 3 and 5 prime.
For a(10)=5101, the right triangle is 101, 5100, 5101 with 101 and 5101 prime.
		

Crossrefs

Contains every value of A051859.

Programs

  • Maple
    N:= 10^8: # to get all terms <= N
    Primes:= select(isprime,[$3..floor(sqrt(2*N-1))]):
    f:= proc(p) local q; q:= (p^2+1)/2; if isprime(q) then q else NULL fi end proc:
    map(f, Primes); # Robert Israel, Sep 16 2014
  • Mathematica
    f[n_]:=((p-1)/2)^2+((p+1)/2)^2; lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst,f[p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 27 2009 *)
  • PARI
    forprime(p=3,10^3,if(isprime(q=(p^2+1)/2),print1(q,", "))) \\ Derek Orr, Apr 30 2015

Formula

a(n) = (A048161(n)^2 + 1)/2 = A067755(n) + 1.

A063440 Number of divisors of n-th triangular number.

Original entry on oeis.org

1, 2, 4, 4, 4, 4, 6, 9, 6, 4, 8, 8, 4, 8, 16, 8, 6, 6, 8, 16, 8, 4, 12, 18, 6, 8, 16, 8, 8, 8, 10, 20, 8, 8, 24, 12, 4, 8, 24, 12, 8, 8, 8, 24, 12, 4, 16, 24, 9, 12, 16, 8, 8, 16, 24, 24, 8, 4, 16, 16, 4, 12, 36, 24, 16, 8, 8, 16, 16, 8, 18, 18, 4, 12, 24, 16, 16, 8, 16, 40, 10, 4, 16
Offset: 1

Views

Author

Henry Bottomley, Jul 24 2001

Keywords

Comments

a(n) = 4 iff either n is in A005383 or n/2 is in A005384.
a(n) is odd iff n is in A001108.
a(n) = 6 if either n = 18 or n = q^2 where q is in A048161 or n = 2 q^2 - 1 where q is in A106483. - Robert Israel, Oct 26 2015
From Bernard Schott, Aug 29 2020: (Start)
a(n-1) is the number of solutions in positive integers (x, y, z) to the simultaneous equations (x + y - z = n, x^2 + y^2 - z^2 = n) for n > 1. See the British Mathematical Olympiad link. In this case, one always has z > x and z > y.
For n = 12 as in the Olympiad problem, the a(11) = 8 solutions are (13,78,79), (14,45,47), (15,34,37), (18,23,29), (23,18,29), (34,15,37), (45,14,47), (78,13,79). (End)

Examples

			a(6) = 4 since 1+2+3+4+5+6 = 21 has four divisors {1,3,7,21}.
		

References

  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 2 of the British Mathematical Olympiad 2007, page 28.

Crossrefs

Cf. A001108, A005383, A005384, A048161, A060778, A081978 (greedy inverse), A106483, A101755 (indices of records), A101756 (records).

Programs

  • Maple
    seq(numtheory:-tau(n*(n+1)/2), n=1..100); # Robert Israel, Oct 26 2015
  • Mathematica
    DivisorSigma[0,#]&/@Accumulate[Range[90]] (* Harvey P. Dale, Apr 15 2019 *)
  • PARI
    for (n=1, 10000, write("b063440.txt", n, " ", numdiv(n*(n + 1)/2)) ) \\ Harry J. Smith, Aug 21 2009
    
  • PARI
    a(n)=factorback(apply(numdiv,if(n%2,[n,(n+1)/2],[n/2,n+1]))) \\ Charles R Greathouse IV, Dec 27 2014
    
  • PARI
    vector(100, n, numdiv(n*(n+1)/2)) \\ Altug Alkan, Oct 26 2015

Formula

a(n) = A000005(A000217(n)).
From Robert Israel, Oct 26 2015: (Start)
a(2k) = A000005(k)*A000005(2k+1).
a(2k+1) = A000005(2k+1)*A000005(k+1).
gcd(a(2k), a(2k+1)) = A000005(2k+1) * A060778(k). (End)

A109953 Primes p such that p^2+2 is a semiprime.

Original entry on oeis.org

2, 7, 11, 17, 29, 37, 43, 53, 73, 79, 83, 97, 137, 191, 233, 251, 263, 269, 271, 277, 281, 359, 379, 389, 433, 461, 479, 521, 541, 577, 601, 631, 647, 677, 691, 719, 739, 827, 829, 863, 881, 929, 947, 983, 997, 1033, 1063, 1087, 1109, 1187, 1223
Offset: 1

Views

Author

Zak Seidov, Jul 06 2005

Keywords

Comments

Cf. A048161 Primes p such that p^2+1 is a semiprime.
Primes p such that (p^2+2)/3 is prime. For all primes q>3, we have q=6k+-1 for some k, which makes it easy to show that 3 divides q^2+2. Hence if q^2+2 is a semiprime then (q^2+2)/3 must be prime. - T. D. Noe, May 05 2006

Examples

			a(2) = 7 is o.k. because 7^2+2=51=3*17 (semiprime), and 17 = A289135(2).
		

Crossrefs

Cf. A118915 (primes p such that (p^2+5)/6 is prime).

Programs

  • Mathematica
    A109953=Select[Prime[Range[200]], Plus@@Last/@FactorInteger[ #^2+2]==2&]
    Select[Prime[Range[200]],PrimeOmega[#^2+2]==2&] (* Harvey P. Dale, Nov 19 2011 *)

Formula

a(n) = sqrt(3*A289135(n) - 2). See the T. D. Noe comment above. - Wolfdieter Lang, Jul 19 2017

A057538 Birthday set of order 5: numbers congruent to +-1 modulo 2, 3, 4 and 5.

Original entry on oeis.org

1, 11, 19, 29, 31, 41, 49, 59, 61, 71, 79, 89, 91, 101, 109, 119, 121, 131, 139, 149, 151, 161, 169, 179, 181, 191, 199, 209, 211, 221, 229, 239, 241, 251, 259, 269, 271, 281, 289, 299, 301, 311, 319, 329, 331, 341, 349, 359, 361, 371, 379, 389, 391, 401, 409
Offset: 1

Views

Author

Andrew R. Feist (andrewf(AT)math.duke.edu), Sep 06 2000

Keywords

Comments

Also numbers congruent to +-1 or +-11 modulo 30 and numbers k where (k^2 - 1)/120 is an integer; all but the first two prime legs of Pythagorean triangles which also have prime hypotenuses appear within in this sequence (A048161). - Henry Bottomley, Jan 31 2002
Numbers k such that k^2 == 1 (mod 30). - Gary Detlefs, Apr 16 2012
Subsequence of primes gives A045468. - Ray Chandler, Jul 29 2019

Examples

			229 is congruent to 1 (mod 2), 1 (mod 3), 1 (mod 4) and -1 (mod 5).
x+ 11*x^2 + 19*x^3 + 29*x^4 + 31*x^5 + 41*x^6 + 49*x^7 + 59*x^8 + 61*x^9 + ...
		

Crossrefs

Programs

  • Maple
    for n from 1 to 409 do if (n^2 mod 30 =1) then print(n) fi od; # Gary Detlefs, Apr 17 2012
  • Mathematica
    a057538[n_] := Block[{f},
      f[x_] :=
       If[Mod[x, #] == 1 || Mod[x, #] == # - 1, True, False] & /@
        Range[2, 5];
    Select[Range[n], DeleteDuplicates[f[#]] == {True} &]]; a057538[409] (* Michael De Vlieger, Dec 26 2014 *)
  • PARI
    {a(n+1) = (n\4*3 + n%4)*10 + (-1)^(n\2)} /* Michael Somos, Oct 17 2006 */

Formula

A093722(n) = (a(n)^2 - 1)/120.
G.f.: x * (1 + 10*x + 8*x^2 + 10*x^3 + x^4) / ((1 - x) * (1 - x^4)). a(-1 - n) = -a(n). - Michael Somos, Jan 21 2012
4*a(n) = 30*(n+1) - 45 + 5*(-1)^n + 6*(-1)^floor((n+1)/2). - R. J. Mathar, Jul 30 2019

Extensions

Corrected by Henry Bottomley, Jan 31 2002
Offset corrected to 1 by Ray Chandler, Jul 29 2019

A340480 Primes p such that (p^8 + 1)/2 is prime.

Original entry on oeis.org

13, 43, 47, 53, 239, 373, 409, 433, 491, 557, 577, 859, 1021, 1103, 1307, 1531, 1699, 1753, 1777, 1871, 2053, 2083, 2297, 2467, 2503, 2593, 2797, 2957, 3251, 3307, 3323, 3511, 3613, 4099, 4523, 4637, 4951, 4999, 5591, 5657, 5693, 5801, 5827, 5849, 6043, 6163
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 31 2021

Keywords

Comments

Expressions of the form m^j + 1 can be factored (e.g., m^3 + 1 = (m + 1)*(m^2 - m + 1)) for any positive integer j except when j is a power of 2, so (p^j + 1)/2 for prime p cannot be prime unless j is a power of 2. A005383, A048161, A176116, and this sequence list primes of the form (p^j + 1)/2 for j=2^0=1, j=2^1=2, j=2^2=4, and j=2^3=8, respectively.
(p^8 + 1)/2 is divisible by 17 when m mod 34 is 3, 5, 7, 11, 23, 27, 29, or 31.

Examples

			(3^8 + 1)/2 = 3281 = 17*193, so 3 is not a term.
(13^8 + 1)/2 = 407865361 is prime, so 13 is a term.
(17^8 + 1)/2 = 3487878721 = 18913 * 184417, so 17 is not a term.
		

Crossrefs

Primes p such that (p^(2^k) + 1)/2 is prime: A005383 (k=0), A048161 (k=1), A176116 (k=2), (this sequence) (k=3).

Programs

A067755 Even legs of Pythagorean triangles whose other leg and hypotenuse are both prime.

Original entry on oeis.org

4, 12, 60, 180, 420, 1740, 1860, 2520, 3120, 5100, 8580, 9660, 16380, 19800, 36720, 60900, 71820, 83640, 100800, 106260, 135720, 161880, 163020, 199080, 205440, 218460, 273060, 282000, 337020, 388080, 431520, 491040, 531480, 539760, 552300
Offset: 1

Views

Author

Henry Bottomley, Jan 31 2002

Keywords

Comments

Apart from the first two terms, every term is divisible by 60 and is of the form 450*k^2 +/- 30*k or 450*k^2 +/- 330*k + 60 for some k.
In such a triangle, this even leg is always the longer leg, and the hypotenuse = a(n) + 1. The Pythagorean triples are (A048161(n), a(n), A067756(n)), so, for a(2) = 12, the corresponding Pythagorean triple is (5, 12, 13). - Bernard Schott, Apr 12 2023

Examples

			4 is a term: in the right triangle (3, 4, 5), 3 and 5 are prime.
5100 is a term: in the right triangle (101, 5100, 5101), 101 and 5101 are prime.
		

Crossrefs

Cf. A048161, A067756. Contains every value of A051858.

Programs

  • Mathematica
    lst={}; Do[q=(Prime[n]^2+1)/2; If[PrimeQ[q], AppendTo[lst, (Prime[n]^2-1)/2]], {n, 200}]; lst (* Frank M Jackson, Nov 02 2013 *)

Formula

a(n) = (A048161(n)^2 - 1)/2 = A067756(n) - 1.

A068501 Values m such that the consecutive pair parameters(m,m+1) generate Pythagorean triples whose odd terms are both prime.

Original entry on oeis.org

1, 2, 5, 9, 14, 29, 30, 35, 39, 50, 65, 69, 90, 99, 135, 174, 189, 204, 224, 230, 260, 284, 285, 315, 320, 330, 369, 375, 410, 440, 464, 495, 515, 519, 525, 534, 545, 564, 575, 585, 590, 680, 719, 729, 744, 749, 765, 854, 870, 905, 915, 950, 974, 1080, 1119
Offset: 1

Views

Author

Lekraj Beedassy, Mar 25 2002

Keywords

Comments

Setting u=m; v=m+1, triples (a,b,c) with a=u+v, b=2*u*v, c = u^2+v^2 = (a^2+1)/2 correspond to (A048161, A067755, A067756), a and c being both prime.

Crossrefs

Cf. A051892.

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[(n+1)^2-n^2]&&PrimeQ[(n+1)^2+n^2],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 01 2010 *)
    Reap[Do[a=Prime[k];If[PrimeQ[(a^2+1)/2],Sow[(a-1)/2]],{k,2,10^5}]][[2,1]](* Zak Seidov, Apr 16 2011 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 19 2002

A048270 Sequence of 2 Pythagorean triangles, each with a leg and hypotenuse prime. The leg of the second triangle is the hypotenuse of the first.

Original entry on oeis.org

3, 11, 19, 59, 271, 349, 521, 929, 1031, 1051, 1171, 2381, 2671, 2711, 2719, 3001, 3499, 3691, 4349, 4691, 4801, 4999, 5591, 5669, 6101, 6359, 6361, 7159, 7211, 7489, 8231, 8431, 8761, 9241, 10099, 10139, 11719, 11821, 12239, 12281, 12781
Offset: 1

Views

Author

Harvey Dubner (harvey(AT)dubner.com)

Keywords

Comments

It is conjectured that there are infinitely many such pairs of triangles.
Subsequence of A048161. - Lekraj Beedassy, Sep 16 2005

Examples

			p(1)=3 because 3 is prime, 5 = (3*3 + 1)/2 and 13 = (5*5 + 1)/2, 5, 13 both prime.
		

Crossrefs

Formula

For each p(n), there is a q=(p*p+1)/2 and r=(q*q+1)/2 such that p, q, r are all prime.

Extensions

More terms from Ray Chandler, Jun 12 2019
Showing 1-10 of 48 results. Next