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!)
A226148 Smallest of three consecutive primes whose sum is a triangular number. 2
2, 3, 619, 1123, 3373, 4603, 6829, 9067, 18973, 25933, 29179, 29741, 33211, 40583, 48313, 72923, 74923, 117991, 130973, 202201, 231067, 253993, 255217, 267317, 291491, 339139, 346309, 363829, 423191, 449621, 476279, 489337, 519487, 533713, 539093, 592507, 602603, 621133 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

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

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;

      r = sqrt(s*2);

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

      p2 = p1, p1 = i;

    }

  return 0;

}

CROSSREFS

Cf. A076304, A206279, A226145, A226146, A226147, A226149, A226150.

Cf. A167788 (the resulting triangular numbers).

Sequence in context: A240709 A264577 A165770 * A108332 A256115 A066685

Adjacent sequences:  A226145 A226146 A226147 * A226149 A226150 A226151

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 April 11 04:01 EDT 2021. Contains 342886 sequences. (Running on oeis4.)