Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A080379
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A080379 Least n such that n consecutive values in A080378 equals 2; i.e. exactly n differences between consecutive primes give residues 2 when divided by 4. +0
2
5, 2, 9, 15, 39, 32, 305, 51, 2631, 3685, 170, 1156, 8775, 98, 5295, 41914, 106469, 167115, 186917 (list; graph; listen)
OFFSET

1,1

FORMULA

a(n)=Min{x; Union[{Mod[A001223(x), 4], ..., Mod[A001223(x+n-1), 4]}]=2}

EXAMPLE

n=4: a(4)=15,differences between {47,53,59,61,67} are {6,6,2,6} corresponds to exactly four differences congruent to 2 mod 4,since before and after 47-43=4 or 71-67=4 are congruent to 0 mod 4.

MATHEMATICA

dp[x_] := Mod[Prime[x+1]-Prime[x], 4] pat[x_, h_] := Table[dp[x+j], {j, 0, h-1}] up[x_, h_] := Union[pat[x, h]] Table[fa=1; k=0; Do[s=up[n, h]; s1=Length[s]; s2=Part[u=pat[n+1, h], Length[u]]; s3=Part[w=pat[n-1, h], 1]; If[Equal[s1, 1]&&Equal[fa, 1]&&Equal[s2, 0]&&Equal[s3, 0], k=k+1; Print[{k, h, n, Prime[n], s, s1}]; fa=0], {n, 2, 200000}], {h, 1, 19}]

CROSSREFS

Cf. A001223, A080378, A080381.

Sequence in context: A119946 A065270 A065282 this_sequence A127098 A127097 A040024

Adjacent sequences: A080376 A080377 A080378 this_sequence A080380 A080381 A080382

KEYWORD

more,nonn

AUTHOR

Labos E. (labos(AT)ana.sote.hu), Mar 04 2003

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 23 17:09 EST 2009. Contains 167438 sequences.


AT&T Labs Research