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

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

A231589 a(n) = sum_{k=1..(n-1)/2} (k^2 mod n).

Original entry on oeis.org

0, 0, 1, 1, 5, 5, 7, 6, 12, 20, 22, 19, 39, 35, 35, 28, 68, 60, 76, 65, 91, 99, 92, 74, 125, 156, 144, 147, 203, 175, 186, 152, 242, 272, 245, 201, 333, 323, 286, 270, 410, 392, 430, 363, 420, 437, 423, 340, 490, 550, 578, 585, 689, 639, 605, 546, 760, 812
Offset: 1

Views

Author

Michel Marcus, Nov 11 2013

Keywords

Comments

This expression occurred to S. A. Shirali while demonstrating a result concerning A081115 and A228432. This led him to investigate integers n such that a(n) = n*(n-1)/4, a(n) = floor(n/4), or a(n) = n*(n-1)/4 - n.

Crossrefs

Programs

  • Mathematica
    Table[Sum[PowerMod[k,2,n],{k,(n-1)/2}],{n,60}] (* Harvey P. Dale, Jan 30 2016 *)
  • PARI
    a(n) = sum(k=1, (n-1)\2, k^2 % n);

A339527 Primes p for which p + k and p^2 + k are prime, where k = (p^2-1)/12.

Original entry on oeis.org

7, 17, 37, 43, 79, 97, 199, 241, 307, 331, 503, 727, 811, 829, 1297, 1303, 1423, 1879, 2017, 2179, 2593, 2617, 2663, 2953, 3121, 3229, 3761, 3779, 4327, 4357, 4391, 4409, 4663, 4861, 4951, 5021, 5147, 5167, 5237, 5669, 5939, 6569, 7129, 7829, 8269, 8731, 9649, 9781, 10159, 10459, 10531, 10663, 11789
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 22 2020

Keywords

Examples

			a(4) = 43 is a term because with k = (43^2-1)/12 = 154, 43, 43+154 = 197 and 43^2+154 = 2003 are all primes.
		

Crossrefs

Cf. A081115.

Programs

  • Maple
    select(t -> isprime(t) and isprime((13*t^2-1)/12) and isprime(t+(t^2-1)/12), [seq(seq(12*i+j,j=[1,5,7,11]),i=0..10000)]);
  • PARI
    isok(p) = isprime(p) && iferr(isprime(p+(p^2-1)/12) && isprime(p^2+(p^2-1)/12), E,0); \\ Michel Marcus, Dec 23 2020

A228432 Sum_{i=1..floor(prime(n)/4)} floor(sqrt(i*prime(n))).

Original entry on oeis.org

0, 0, 2, 2, 7, 14, 24, 25, 37, 70, 71, 114, 140, 143, 170, 234, 274, 310, 357, 399, 444, 498, 552, 660, 784, 850, 856, 926, 990, 1064, 1310, 1395, 1564, 1574, 1850, 1859, 2054, 2173, 2277, 2494, 2623, 2730, 2986, 3104, 3234, 3246, 3656, 4085, 4235, 4370
Offset: 1

Views

Author

Michel Marcus, Nov 11 2013

Keywords

Comments

If p = prime(n) in A002145 and n>3, or said differently, if n in A080148 and n>1, then a(n) = A081115(n).

Examples

			For n=7, p=17 and a(7) = floor(sqrt(17)) + floor(sqrt(34)) + floor(sqrt(51)) + floor(sqrt(68)) = 4+5+7+8 = 24.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; Sum[Floor[Sqrt[i*p]], {i, Floor[p/4]}], {n, 100}] (* T. D. Noe, Nov 13 2013 *)
  • PARI
    a(n) = p = prime(n); sum(i=1, p\4, sqrtint(i*p));
Showing 1-4 of 4 results.