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!)
A226069 Primes p such that p-1 is a square and p-2 is a triangular number. 6
2, 5, 17, 17957, 4726277, 23911673957 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Roots of squares: a(n)-1 = b(n)*b(n), b(n) = A226070(n).

Roots of triangular numbers: a(n)-2 = c(n)*(c(n)+1)/2, c(n) = A226071(n).

Primes of the form A006452(k)^2+1. a(7) is too large to include here (see b-file). - Max Alekseyev, Jan 30 2014

LINKS

Max Alekseyev, Table of n, a(n) for n = 1..12

PROG

(C)

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#define TOP (1ULL<<34)

int main() {

  unsigned long long i, j, k, r, n=1;

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

  memset(c, 0, TOP/8);

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

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

      ++n;

      if (i<(1ULL<<32))

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

    }

  //printf("%llu\n", n);

  for (i=1, j=i*i+1; j < TOP*2; i++, j=i*i+1)

    if(j==2 || ((j&1) && (c[j>>4] & (1<<((j>>1) & 7)))==0)) {

      k = j-2;

      r = sqrt(k*2);

      if (r*r+r==k*2) printf("%9llu %9llu %9llu\n", r, i, j);

    }

  free(c);

  return 0;

}

CROSSREFS

Cf. A226070-A226074.

Sequence in context: A182313 A124374 A113617 * A258429 A117839 A269665

Adjacent sequences:  A226066 A226067 A226068 * A226070 A226071 A226072

KEYWORD

nonn

AUTHOR

Alex Ratushnyak, May 25 2013

EXTENSIONS

Terms a(7)-a(12) from Max Alekseyev, Jan 30 2014

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 May 25 17:53 EDT 2020. Contains 334595 sequences. (Running on oeis4.)