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-5 of 5 results.

A163420 Primes p such that p+(p^2-1)/4 is also prime.

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 29, 31, 37, 41, 47, 59, 61, 89, 107, 109, 127, 131, 139, 151, 191, 199, 227, 229, 239, 251, 281, 307, 317, 337, 347, 359, 367, 389, 397, 439, 449, 461, 479, 487, 491, 569, 587, 601, 617, 659, 661, 677, 701, 719, 727, 769, 809, 839, 911, 941
Offset: 1

Views

Author

Keywords

Examples

			3 is in the sequence because 3+(3^2-1)/4=5 is a prime number.
5 is in the sequence because 5+(5^2-1)/4=11 is a prime number.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(3,1000) | IsPrime(p+(p^2-1) div 4)]; // Vincenzo Librandi, Apr 08 2013
  • Mathematica
    f[n_]:=((p+1)/2)^2+((p-1)/2); lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst, p]],{n,6!}];lst
    Select[Range[700], PrimeQ[#] && PrimeQ[# + (#^2 - 1)/4] &] (* Vincenzo Librandi, Apr 08 2013 *)
    Select[Prime[Range[200]],PrimeQ[#+(#^2-1)/4]&] (* Harvey P. Dale, Jun 18 2014 *)

Formula

A163419(n) = a(n)+( a(n)^2-1 )/4. [R. J. Mathar, Aug 17 2009]
{A000040(k): A000040(k)+A024701(k-1) in A000040}.

Extensions

Definition simplified by R. J. Mathar, Aug 17 2009

A024700 a(n) = (prime(n+2)^2 - 1)/3.

Original entry on oeis.org

8, 16, 40, 56, 96, 120, 176, 280, 320, 456, 560, 616, 736, 936, 1160, 1240, 1496, 1680, 1776, 2080, 2296, 2640, 3136, 3400, 3536, 3816, 3960, 4256, 5376, 5720, 6256, 6440, 7400, 7600, 8216, 8856, 9296, 9976, 10680, 10920, 12160, 12416, 12936, 13200, 14840, 16576, 17176
Offset: 1

Views

Author

Clark Kimberling, Dec 11 1999

Keywords

Comments

Numbers of the form 4*h*(3*h +- 1). - Vincenzo Librandi, May 21 2013
This sequence is also: Numbers n such that k is prime and its square is of the form 3*n + 1 (i.e., k^2 = 3*n + 1). For this case, the sequence is to be prepended with a(0) = 1. - G. C. Greubel, Sep 18 2016

Crossrefs

Programs

  • Magma
    [(NthPrime(n+2)^2-1)/3: n in [1..50]]; // Bruno Berselli, May 22 2013
    
  • Mathematica
    Select[Range[2,10000], PrimeQ[Sqrt[3*#+1]] &] (* G. C. Greubel, Sep 18 2016 *)
    (Prime[Range[3,50]]^2-1)/3 (* Harvey P. Dale, May 05 2022 *)
  • PARI
    a(n) = (prime(n+2)^2-1)/3; \\ Altug Alkan, Sep 18 2016
    
  • SageMath
    [(n^2 -1)/3 for n in prime_range(4,301)] # G. C. Greubel, May 02 2024

Formula

a(n) = (A001248(n+2) - 1)/3. - Elmo R. Oliveira, Jan 20 2023
a(n) = 8*A024702(n+2) = 4*A081115(n+2) = 2*A084922(n+2) = (2/3)*A084921(n) = (4/3)*A024701(n+1) = (8/3)*A061066(n+2). - Alois P. Heinz, Jan 20 2023

A062046 Sum of even numbers between consecutive primes.

Original entry on oeis.org

0, 4, 6, 18, 12, 30, 18, 42, 78, 30, 102, 78, 42, 90, 150, 168, 60, 192, 138, 72, 228, 162, 258, 372, 198, 102, 210, 108, 222, 840, 258, 402, 138, 720, 150, 462, 480, 330, 510, 528, 180, 930, 192, 390, 198, 1230, 1302, 450, 228, 462, 708, 240, 1230, 762, 780
Offset: 1

Views

Author

Amarnath Murthy, Jun 06 2001

Keywords

Comments

First differences of A024701. - Gionata Neri, May 25 2015

Examples

			a(4) = 18 = 8+10 as the even numbers between 7 and 11 are 8 and 10. a(4) = (11+7)(11-7)/4 = 18.
		

Crossrefs

a(n)= ( p(n) + e(n)) * e(n), e(n) := A001223(n) / 2, for n > 1

Programs

  • Mathematica
    Total[Select[Range[#[[1]]+1,#[[2]]-1],EvenQ]]&/@ Partition[ Prime[ Range[ 60]],2,1] (* Harvey P. Dale, May 28 2013 *)
  • PARI
    { for (n=1, 1000, a=(prime(n + 1)^2 - prime(n)^2)/4; if (n==1, a=0); write("b062046.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 30 2009

Formula

a(n) = (prime(n+1)+prime(n))*(prime(n+1)-prime(n))/4 = (prime(n+1)^2-prime(n)^2)/4.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 07 2001
Offset changed from 0 to 1 by Harry J. Smith, Jul 30 2009

A302717 Start with a(0) = 0, then append the terms in [x, 2*x+1, x*(x+1)] which do not occur earlier, for x = 1, 2, ...

Original entry on oeis.org

0, 1, 3, 2, 5, 6, 7, 12, 4, 9, 20, 11, 30, 13, 42, 15, 56, 8, 17, 72, 19, 90, 10, 21, 110, 23, 132, 25, 156, 27, 182, 14, 29, 210, 31, 240, 16, 33, 272, 35, 306, 18, 37, 342, 39, 380, 41, 420, 43, 462, 22, 45, 506, 47, 552, 24, 49, 600, 51, 650, 26, 53, 702, 55, 756, 28, 57, 812, 59, 870, 61, 930, 63, 992, 32, 65, 1056, 67, 1122, 34, 69, 1190
Offset: 0

Views

Author

J. Stauduhar, Apr 12 2018

Keywords

Comments

A permutation of the nonnegative integers.
If a(n) is in A024701 (i.e., of the form (prime^2-1)/4), then a(n-1) is prime. Indeed, A024701(m) = k*(k+1) with k = (prime(m+1)-1)/2, and any term k*(k+1) > 0 is preceded by 2*k+1 = prime(m+1). [Edited and proof added by M. F. Hasler, Apr 13 2018]
The term x*(x+1) will always be appended since it is larger than all preceding terms (except for x = 1), and also 2*x+1 cannot occur earlier because it is odd while x*(x+1) is always even. So only the term x will be inserted (or not) in a somewhat irregular pattern, namely whenever x is an even but not oblong number (A002378). We see that this is the case for x = 4, 8, 10, 14, 16, 18, 22, ...; recognizable by the fact that a(n) = (a(n+1)-1)/2 and equivalently, there are two and not only one smaller number between two larger "records" x*(x+1).
If we count the terms added from each 4-tuple during each iteration we find that either two or three terms are added: 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, ... where the set of three twos (2, 2, 2) appears with decreasing frequency.
A302906 is the sequence of starting indices of these sets.

Examples

			Repeatedly take consecutive numbers a and b and append to the sequence any of {a, a+b, a*b, b} not already in the sequence. Beginning with a=0 and b=1:
(0,1) -> {0, 0+1, 0*1, 1} -> [0,1]
(1,2) -> {1, 1+2, 1*2, 2} -> [0,1,3,2]
(2,3) -> {2, 2+3, 2*3, 3} -> [0,1,3,2,5,6]
(3,4) -> {3, 3+4, 3*4, 4} -> [0,1,3,2,5,6,7,12,4]
etc.
In the above construction, we always have b = a+1. Thus [a, a+b, a*b, b] = [a, 2*a+1, a*(a+1), a+1], and a simpler description is to consider only { a, 2*a+1, a*(a+1) }, the 4th term being equal to the 1st term of the next 4-tuple. To ensure we have a permutation of the integers >= 0 starting at index 0 and not a list stating at index 1, we can fix a(0) = 0 explicitly and then go on with a = x = 1, 2, 3, ... to get the same sequence.
		

Crossrefs

Programs

  • PARI
    u=[];(do(x)=setsearch(u,x)||print1(x",")||u=setunion(u,[x]));for(a=0,199,do(a);do(2*a+1);do(a^2+a)) \\ M. F. Hasler, Apr 12 2018

A074367 (p^2-5)/4 for odd primes p.

Original entry on oeis.org

1, 5, 11, 29, 41, 71, 89, 131, 209, 239, 341, 419, 461, 551, 701, 869, 929, 1121, 1259, 1331, 1559, 1721, 1979, 2351, 2549, 2651, 2861, 2969, 3191, 4031, 4289, 4691, 4829, 5549, 5699, 6161, 6641, 6971, 7481, 8009, 8189, 9119, 9311, 9701, 9899, 11129
Offset: 1

Views

Author

Roger L. Bagula, Sep 23 2002

Keywords

Crossrefs

a(n) = A024701(n)-1.

Programs

  • Mathematica
    a[n_] := (Prime[n+1]^2-5)/4
    (#^2-5)/4&/@Prime[Range[2,50]] (* Harvey P. Dale, Jan 15 2019 *)

Extensions

Edited by Dean Hickerson, Oct 09 2002
Showing 1-5 of 5 results.