login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226149 Smallest of three consecutive primes whose average is a square. 3
2393, 25913, 47951, 123191, 131759, 219953, 330611, 356387, 450227, 769117, 826271, 870479, 1026143, 1500613, 1515347, 1697797, 1846861, 1907141, 2013541, 2217107, 2486873, 2732383, 3229189, 3294191, 3956101, 4338871, 4481677, 4739297, 5022067, 5239511, 5294591, 5774387 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..32.

MATHEMATICA

Select[Partition[Prime[Range[400000]], 3, 1], IntegerQ[Sqrt[Mean[#]]]&][[All, 1]] (* Harvey P. Dale, Jan 10 2021 *)

PROG

(C)

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#define TOP (1ULL<<30)

int main() {

  unsigned long long i, j, p1, p2, r, s;

  unsigned char *c = (unsigned char *)malloc(TOP/8);

  memset(c, 0, TOP/8);

  for (i=3; i < TOP; i+=2)

    if ((c[i>>4] & (1<<((i>>1) & 7)))==0 /*&& i<(1ULL<<32)*/)

        for (j=i*i>>1; j<TOP; j+=i)  c[j>>3] |= 1 << (j&7);

  for (p2=2, p1=3, i=5; i < TOP; i+=2)

    if ((c[i>>4] & (1<<((i>>1) & 7)))==0) {

      s = p2 + p1 + i;

      if ((s%3)==0) {

        s/=3;

        r = sqrt(s);

        if (r*r==s) printf("%llu, ", p2);

      }

      p2 = p1, p1 = i;

    }

  return 0;

}

CROSSREFS

Cf. A076304, A206279, A226145-A226150.

Sequence in context: A100974 A279538 A098680 * A115931 A323344 A323341

Adjacent sequences:  A226146 A226147 A226148 * A226150 A226151 A226152

KEYWORD

nonn

AUTHOR

Alex Ratushnyak, May 28 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 30 17:21 EDT 2021. Contains 346359 sequences. (Running on oeis4.)