Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A155819
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A155819 a(n)=p(n)^2 + 2p(n-1) + 1; p(n) is the nth prime number and n>1 +0
1
14, 32, 60, 136, 192, 316, 396, 568, 888, 1020, 1432, 1756, 1932, 2296, 2904, 3588, 3840, 4612, 5176, 5472, 6388, 7048, 8088, 9588, 10396, 10812, 11656, 12096, 12988 (list; graph; listen)
OFFSET

1,1

COMMENT

All the terms are even.

PROGRAM

(C) # include <stdio.h>

# include <conio.h>

# include <math.h>

int is_prime(int n){

int i, flag=1;

for(i=2; i<=sqrt(n); i++) if(n%i==0) flag=0; return flag;

}

main(){

int p[30], out[30];

int i, j, k=0;

clrscr();

for(i=2; k<30; i++) if(is_prime(i)) p[k++ ]=i;

out[0]=0; //arbitarily assigned

for(i=1; i<30; i++) out[i]=p[i]*p[i]+2*p[i-1]+1;

for(i=0; i<30; i++) printf("%d, ", out[i]);

getch(); return 0; }

CROSSREFS

Sequence in context: A101444 A084194 A031109 this_sequence A120711 A018959 A107484

Adjacent sequences: A155816 A155817 A155818 this_sequence A155820 A155821 A155822

KEYWORD

nonn

AUTHOR

Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 28 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research