cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A346609 The successive odd nonprimes produced during the construction of A203069.

Original entry on oeis.org

1, 9, 15, 9, 15, 25, 15, 9, 15, 25, 21, 9, 15, 21, 25, 33, 35, 39, 45, 49, 45, 33, 35, 45, 49, 45, 49, 57, 55, 57, 63, 65, 63, 65, 69, 75, 77, 75, 77, 75, 77, 85, 87, 85, 87, 91, 93, 95, 99, 105, 111, 115, 111, 105, 111, 115, 105, 99, 105, 115, 121, 123, 125, 129, 133, 135, 133, 129
Offset: 1

Views

Author

Harvey P. Dale and N. J. A. Sloane, Aug 16 2021

Keywords

Crossrefs

A346610 First differences of A203069.

Original entry on oeis.org

7, -1, -5, 11, -1, -9, 3, 3, 7, -11, -1, 7, -1, 5, 3, -1, 5, 1, 3, -7, -5, 7, 3, 1, -5, 9, -1, -1, 3, 3, -1, -1, 3, 1, 5, -3, 1, 1, -3, 5, 3, -1, -1, 3, 1, 1, 1, 3, 3, 3, 1, -5, -1, 7, -3, -7, 1, 5, 5, 1, 1, 1, 3, 1, 1, -3, -1, 5, 3, -1, -1, 3, 1, 5, -3, 1, 1, -3, 5, 1, 3, 1, 1
Offset: 1

Views

Author

Harvey P. Dale and N. J. A. Sloane, Aug 16 2021

Keywords

Comments

In the first 100000 terms, the only differences between terms of A203069 are -11, -9, -7, -5, -3, -1, 1, 3, 5, 7, 9, 11.

Crossrefs

A346611 a(n) = (A203069(n)-n)/2.

Original entry on oeis.org

0, 3, 2, -1, 4, 3, -2, -1, 0, 3, -3, -4, -1, -2, 0, 1, 0, 2, 2, 3, -1, -4, -1, 0, 0, -3, 1, 0, -1, 0, 1, 0, -1, 0, 0, 2, 0, 0, 0, -2, 0, 1, 0, -1, 0, 0, 0, 0, 1, 2, 3, 3, 0, -1, 2, 0, -4, -4, -2, 0, 0, 0, 0, 1, 1, 1, -1, -2, 0, 1, 0, -1, 0, 0, 2, 0, 0, 0, -2, 0, 0, 1, 1, 1, -1, -2
Offset: 1

Views

Author

Harvey P. Dale and N. J. A. Sloane, Aug 16 2021

Keywords

Comments

The terms are surprisingly small.

Crossrefs

A249918 Inverse permutation to A203069.

Original entry on oeis.org

1, 4, 7, 12, 11, 8, 3, 2, 9, 14, 13, 6, 5, 22, 15, 10, 17, 16, 21, 26, 23, 18, 19, 24, 25, 20, 29, 28, 27, 30, 33, 32, 31, 34, 35, 40, 37, 38, 39, 36, 41, 44, 43, 42, 45, 46, 47, 48, 57, 58, 49, 54, 53, 50, 59, 56, 51, 52, 55, 60, 61, 62, 63, 68, 67, 64, 65
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 14 2015

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a249918 = (+ 1) . fromJust . (`elemIndex` a203069_list)

A264030 Primes p such that A203069(p) is also prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 37, 41, 43, 47, 53, 61, 71, 73, 89, 97, 103, 107, 109, 127, 131, 137, 139, 151, 163, 167, 173, 191, 193, 197, 211, 223, 227, 233, 239, 241, 257, 263, 269, 277, 283, 293, 311, 313, 317, 331, 347, 349, 359, 367, 379, 397, 419, 433, 443, 449
Offset: 1

Views

Author

Bill McEachen, Nov 01 2015

Keywords

Comments

This provides an ordered subset of the prime numbers.

Examples

			A203069(3)=7, both are prime numbers, so the 1st entry=3.
A203069(53)=53, both are prime numbers, so the 12th entry=53.
		

Crossrefs

Cf. A203069.

Extensions

More terms from Michel Marcus, Nov 02 2015

A055266 a(n) + a(n+1) is never prime; lexicographically earliest such sequence of distinct positive integers.

Original entry on oeis.org

1, 3, 5, 4, 2, 6, 8, 7, 9, 11, 10, 12, 13, 14, 16, 17, 15, 18, 20, 19, 21, 23, 22, 24, 25, 26, 28, 27, 29, 31, 32, 30, 33, 35, 34, 36, 38, 37, 39, 41, 40, 42, 43, 44, 46, 45, 47, 48, 50, 49, 51, 53, 52, 54, 56, 55, 57, 58, 59, 60, 61, 62, 63, 65, 64, 66, 67, 68, 70, 71, 69, 72
Offset: 1

Views

Author

Henry Bottomley, May 09 2000

Keywords

Comments

See A253074 for an essentially identical sequence (with a proof that the sequence is a permutation).
Sequence A253074 is defined in the same way, but starting with 0. This happens to produce the same sequence from the next term on. This is the case (M,N) = (2,0) in the family of sequences where M consecutive terms yield N primes in their pairwise sums, see the wiki page for other examples. - M. F. Hasler, Nov 26 2019

Examples

			a(3) = 5 because 1 and 3 have already been used and both 3 + 2 = 5 and 3 + 4 = 7 are prime while 3 + 5 = 8 is not prime.
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a055266 n = a055266_list !! (n-1)
    a055266_list = 1 : f 1 [2..] where
       f u vs = g vs where
         g (w:ws) | a010051' (u + w) == 0 = w : f w (delete w vs)
                  | otherwise = g ws
    -- Reinhard Zumkeller, Jan 14 2015
    
  • Maple
    N:= 1000; # to get a[n] for n up to N
    A:= {1};
    a[1]:= 1;
    for n from 2 to N do
      mA:= max(A);
      R:= {$1..mA} minus A;
      for x in R do
         if not isprime(a[n-1]+x) then
           a[n]:= x;
           break
         fi
       od:
       if not assigned(a[n]) then
         for x from mA+1 do
           if not isprime(a[n-1]+x) then
             a[n]:= x;
             break
           fi
         od
       fi;
       A:= A union {x};
    od:
    seq(a[n],n=1..N); # Robert Israel, Jun 03 2014
  • Mathematica
    f[ s_ ]:=Block[ {k=1,a=s[ [ -1 ] ]},While[ Or[ MemberQ[ s,k ],PrimeQ[ a+k ] ],k++ ];Append[ s,k ] ];Nest[ f,{1},121 ] (* Zak Seidov, Oct 21 2009 *)
    a={1};z=Range[2,2002];z=Complement[z,a];While[Length[z]>1,If[!PrimeQ[z[[1]]+Last[a]],AppendTo[a,z[[1]]],If[!PrimeQ[z[[2]]+Last[a]],AppendTo[a,z[[2]]],AppendTo[a,z[[3]]]]];z=Complement[z,a]];Print[a] (* significantly faster *) (* Vladimir Joseph Stephan Orlovsky, May 03 2011 *)
  • PARI
    v=[1]; n=1; while(n<100, if(!isprime(n+v[#v])&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v \\ Derek Orr, Jun 08 2015
    
  • PARI
    A055266_upto(n=99, u=1, U, a)={vector(n, n, n=u; while(bittest(U, n-u)|| isprime(a+n), n++); if(n>u, U+=1<<(n-u), U>>=-u+u+=valuation(U+2, 2)); a=n) + if(default(debug), print([u]))} \\ Optional args allow to tweak computation. If debug > 0, print least unused number at the end. - M. F. Hasler, Nov 25 2019

Formula

a(n) = A253074(n+1) (as long as A253074(1) = 0). - M. F. Hasler, Nov 26 2019

Extensions

Corrected by Zak Seidov, Oct 21 2009
Name edited by M. F. Hasler, Nov 26 2019

A203077 Alternating-parity rearrangement of natural numbers: a(n) is the smallest number such that a(n-1)^2 + a(n)^2 is odd and composite.

Original entry on oeis.org

1, 8, 9, 2, 11, 10, 5, 12, 3, 4, 7, 6, 13, 14, 17, 16, 15, 18, 19, 22, 21, 20, 25, 30, 27, 24, 23, 26, 29, 28, 31, 32, 35, 38, 33, 34, 37, 36, 39, 42, 41, 40, 45, 44, 43, 46, 47, 50, 49, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 62, 61, 66, 67, 64, 65
Offset: 1

Views

Author

Zak Seidov, Dec 29 2011

Keywords

Comments

The maximum between a(n) and the n-th integer appears to be +-6. In the first 10k terms, the distribution of differences, from -6 to 6 is: 27, 140, 1350, 7002, 1282, 168, 31. Therefore I conjecture that Lim_{n->infinity} a(n) = n.

Examples

			1^2 + 8^2 = 65 composite, 8^2 + 9^2 = 145 composite, 9^2 + 2^2 = 85 composite.
		

Crossrefs

Cf. A203069.

Programs

  • Mathematica
    f[s_List] := Block[{k = If[ OddQ[ s[[-1]]], 2, 3], m = s[[-1]]}, While[a = k^2 + m^2; MemberQ[s, k] || PrimeQ[a] || EvenQ[a], k += 2]; Append[s, k]]; Nest[f, {1}, 70] (* Robert G. Wilson v, Jan 02 2012 *)
Showing 1-7 of 7 results.