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-10 of 13 results. Next

A181730 Fixed points in A100208.

Original entry on oeis.org

1, 2, 3, 5, 25, 33, 41, 60, 61, 64, 66, 72, 88, 129, 203, 212, 299, 313, 330, 380, 419, 442, 463, 480, 487, 517, 533, 560, 589, 603, 607, 633, 646, 649, 657, 658, 689, 703, 759, 776, 782, 791, 807, 814, 843, 853, 874, 907, 922, 953, 1034, 1075, 1127, 1140, 1143, 1149, 1156, 1232, 1237, 1243, 1270, 1288, 1339, 1341, 1395, 1409, 1518, 1525
Offset: 1

Views

Author

Zak Seidov, Nov 16 2010

Keywords

Comments

Numbers n with property that A100208(n)=n.
There are 677 fixed points among first 20000 terms of A100208.

Crossrefs

Cf. A100208.

Programs

  • PARI
    print1(1,", ");v=[1]; k=1; while(#v<=10^3, if(isprime(k^2+v[#v]^2)&&!vecsearch(vecsort(v), k), v=concat(v, k); if(k==#v, print1(k, ", ")); k=0); k++); \\ Derek Orr, Jun 08 2015

A100209 a(n) = A100208(n)^2 + A100208(n+1)^2.

Original entry on oeis.org

5, 13, 73, 89, 41, 97, 181, 149, 193, 313, 569, 521, 157, 397, 557, 421, 709, 773, 613, 853, 1429, 1741, 1097, 881, 1201, 1801, 1901, 1117, 1597, 2677, 3121, 2689, 1873, 2153, 2393, 1753, 3229, 3461, 2897, 3617, 3797, 4517, 3697, 5521, 5669, 3469, 4729
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 08 2004

Keywords

Comments

Pythagorean primes: A079260(a(n)) = 1, see A100210;
a(n) = A073658(n) + A073658(n+1).

Crossrefs

Cf. A002144.

A100211 Inverse to A100208.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 08 2004

Keywords

A181723 "Early bird" numbers in A100208.

Original entry on oeis.org

8, 9, 10, 12, 13, 20, 19, 22, 23, 30, 29, 35, 34, 39, 40, 37, 50, 44, 46, 49, 65, 52, 57, 68, 55, 58, 62, 73, 71, 79, 76, 85, 77, 80, 92, 82, 83, 86, 95, 102, 97, 103, 100, 96, 101, 145, 106, 109, 112, 117, 122, 113, 118, 124, 119, 127, 133, 130, 136, 135, 146, 140, 151, 156, 179, 150, 163, 148, 175, 157, 158, 160, 154, 166, 182, 177, 172, 190, 174, 199, 189, 176, 184, 180, 197, 193, 200, 191, 196, 195, 202, 208, 209, 204, 230, 240, 211, 220, 215, 218, 238, 223, 222, 233, 232, 235, 236, 258, 275, 255, 251
Offset: 1

Views

Author

Zak Seidov, Nov 17 2010

Keywords

Comments

Numbers n with property that position of n in A100208 < n;
n's are given in the order of their appearances in A100208 (and hence the sequence is not monotone).

Crossrefs

A171964 "Late bird" numbers in A100208.

Original entry on oeis.org

4, 7, 11, 6, 14, 15, 17, 18, 16, 24, 26, 21, 28, 32, 27, 31, 36, 38, 45, 43, 42, 47, 48, 53, 54, 59, 56, 51, 63, 67, 70, 69, 78, 87, 81, 74, 89, 91, 90, 84, 94, 75, 93, 98, 107, 110, 111, 104, 105, 116, 115, 108, 120, 99, 123, 128, 125, 114, 126, 121, 137, 138, 132, 143, 141, 139, 134, 131, 144, 149, 155, 142, 153, 147, 159, 164, 161, 170, 171, 169, 167, 152, 165, 178, 173, 168, 162, 188, 187, 183, 185, 186, 181, 201, 206, 192, 205, 207, 213, 198, 217, 194, 219, 221, 210, 227, 214, 224, 225, 226, 234, 229, 239, 231, 237, 243, 245, 216, 228, 252, 247, 241, 249, 259, 246, 256, 261, 260, 263, 242, 267, 270, 262, 253, 281, 276, 269, 264, 271, 284, 285, 286, 294, 290
Offset: 1

Views

Author

Zak Seidov, Nov 19 2010

Keywords

Comments

Numbers n with property that n = A100208(m) with m > n;
n's are given in the order of their appearances in A100208 (and hence the sequence is not monotone).

Crossrefs

A257218 Lexicographically earliest sequence of distinct positive integers such that gcd(a(n), a(n-1)) takes no value more than twice.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 10, 5, 15, 9, 18, 12, 16, 24, 30, 20, 40, 32, 48, 36, 27, 54, 72, 60, 45, 75, 25, 50, 70, 7, 14, 28, 42, 21, 63, 126, 84, 56, 112, 64, 96, 120, 80, 100, 150, 90, 108, 81, 162, 216, 144, 168, 140, 35, 105, 210, 180, 135, 225, 300
Offset: 1

Views

Author

Ivan Neretin, Apr 18 2015

Keywords

Comments

Presumably a(n) is a permutation of the positive integers.
Primes seem to occur in their natural order. 31 appears as a(7060). Primes p >= 37 are not found among the first 10000 terms.
Numbers n such that a(n)=n are 1, 2, 3, 12, 306, ...
A256918(n) = gcd(a(n), a(n+1)); gcd(a(A257120(n)), a(A257120(n)+1)) = gcd(a(A257475(n)), a(A257475(n)-1)) = n. - Reinhard Zumkeller, Apr 25 2015
For p prime: A257122(p)-1 = index of the smallest multiple of p: a(A257122(p)-1) mod p = 0 and a(m) mod p > 0 for m < A257122(p)-1. - Reinhard Zumkeller, Apr 26 2015

Examples

			After a(9)=15, the values 1, 2, 3, 4, 6, and 8 are already used, while 7 is forbidden because gcd(15,7)=1 and that value of GCD has already occurred twice, at (1,2) and (2,3). The minimal value which is neither used not forbidden is 9, so a(10)=9.
		

Crossrefs

Other minimal sequences of distinct positive integers that match some condition imposed on a(n) and a(n-1):
A175498 (differences are unique),
A081145 (absolute differences are unique),
A235262 (bitwise XORs are unique),
A163252 (differ by one bit in binary),
A000027 (GCD=1),
A064413 (GCD>1),
A128280 (sum is a prime),
A034175 (sum is a square),
A175428 (sum is a cube),
A077220 (sum is a triangular number),
A073666 (product plus 1 is a prime),
A081943 (product minus 1 is a prime),
A091569 (product plus 1 is a square),
A100208 (sum of squares is a prime).
Cf. A004526.
Cf. A256918, A257120, A257475, A257478, A257122 (putative inverse).
Cf. also A281978.

Programs

  • Haskell
    import Data.List (delete); import Data.List.Ordered (member)
    a257218 n = a257218_list !! (n-1)
    a257218_list = 1 : f 1 [2..] a004526_list where
       f x zs cds = g zs where
         g (y:ys) | cd `member` cds = y : f y (delete y zs) (delete cd cds)
                  | otherwise       = g ys
                  where cd = gcd x y
    -- Reinhard Zumkeller, Apr 24 2015
  • Mathematica
    a={1}; used=Array[0&,10000]; Do[i=1; While[MemberQ[a,i] || used[[l=GCD[a[[-1]],i]]]>=2, i++]; used[[l]]++; AppendTo[a,i], {n,2,100}]; a (* Ivan Neretin, Apr 18 2015 *)

A080478 a(n) = smallest k>a(n-1) such that k^2+a(n-1)^2 is prime, starting with a(1)=1. Square roots of A062067(n).

Original entry on oeis.org

1, 2, 3, 8, 13, 20, 23, 30, 31, 44, 49, 74, 79, 80, 89, 96, 101, 104, 105, 116, 119, 124, 131, 134, 139, 140, 149, 150, 157, 158, 165, 172, 173, 178, 183, 202, 203, 230, 231, 250, 257, 260, 261, 274, 289, 290, 291, 296, 311, 334, 335, 342, 343, 360, 367, 372
Offset: 1

Views

Author

Ralf Stephan, Mar 22 2003

Keywords

Crossrefs

Programs

  • Haskell
    a080478 n = a080478_list !! (n-1)
    a080478_list = 1 : f 1 [2..] where
       f x (y:ys) | a010051 (x*x + y*y) == 1 = y : (f y ys)
                  | otherwise                = f x ys
    -- Reinhard Zumkeller, Apr 28 2011
    
  • Maple
    A[1]:= 1:
    for n from 2 to 100 do
      for k from A[n-1]+1 while not isprime(k^2+A[n-1]^2) do od:
      A[n]:= k
    od:
    seq(A[n],n=1..100); # Robert Israel, Sep 01 2014
  • Mathematica
    nxt[n_]:=Module[{n2=n^2,k=n+1},While[!PrimeQ[k^2+n2],k++];k]; NestList[nxt,1,60] (* Harvey P. Dale, Jun 24 2012 *)
    a=1;sq={1}; Do[a2=a^2;b=a+1;While[!PrimeQ[a2+b^2],b=b+2]; AppendTo[sq,b]; a=b,{100}];sq (* Zak Seidov, Feb 21 2014 *)
  • PARI
    p=1;print1(p",");for(n=2,1000, if(isprime(p+n^2),print1(n",");p=n^2))
    
  • Python
    from sympy import isprime
    A080478, a = [1], 1
    for _ in range(1,10000):
        a += 1
        b = 2*a*(a-1) + 1
        while not isprime(b):
            b += 4*(a+1)
            a += 2
        A080478.append(a) # Chai Wah Wu, Sep 01 2014

Extensions

PARI program corrected by Zak Seidov, Apr 14 2008

A308334 Lexicographically earliest sequence of distinct positive numbers such that for any n > 0, a(n) OR a(n+1) is a prime number (where OR denotes the bitwise OR operator).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 20 2019

Keywords

Comments

By Dirichlet's theorem on arithmetic progressions, we can always extend the sequence: say a(n) < 2^k, then a(n) OR 1 and 2^k are coprime and there are infinitely many prime numbers of the form (a(n) OR 1) + m*2^k = a(n) OR (1 + m*2^k) and we can extend the sequence.
Will every integer appear in this sequence?
Numerous sequences are based on the same model: the sequence is the lexicographically earliest sequence of distinct positive terms such that some function in two variables yields prime numbers when applied to consecutive terms:
f(u,v) Analog sequence
------- -----------------
u OR v a (this sequence)
u + v A055265
u*v + 1 A073666
u*v - 1 A081943
abs(u-v) A065186
max(u,v) A282649
u^2 + v^2 A100208
The appearance of numbers much earlier or later than their corresponding index is flagged strikingly in the plot2 graph of a(n)/n (see links). - Peter Munn, Sep 10 2022

Examples

			The first terms, alongside a(n) OR a(n+1), are:
  n   a(n)  a(n) OR a(n+1)
  --  ----  --------------
   1     1               3
   2     2               3
   3     3               7
   4     4               5
   5     5               7
   6     6               7
   7     7              23
   8    16              29
   9    13              13
  10     8              11
  11    11              11
  12     9              11
		

Crossrefs

See A308340 for the corresponding prime numbers.
See A055265, A065186, A073666, A081943, A100208, A282649 for similar sequences.

Programs

  • PARI
    s=0; v=1; for (n=1, 67, s+=2^v; print1 (v ", "); for (w=1, oo, if (!bittest(s,w) && isprime(o=bitor(v,w)), v=w; break)))
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen():
        aset, k, mink = {1}, 1, 2
        for n in count(1):
            an = k; yield an; aset.add(an)
            s, k = set(str(an)), mink
            while k in aset or not isprime(an|k): k += 1
            while mink in aset: mink += 1
    print(list(islice(agen(), 67))) # Michael S. Branicky, Sep 10 2022

A244915 Smallest positive integer a(n) such that b(n) = a(n)^2 + a(n-1)^2 is a prime different from the primes b(1), b(2), ..., b(n-1), where a(0) = 1.

Original entry on oeis.org

1, 1, 2, 3, 8, 5, 2, 7, 8, 13, 2, 15, 4, 1, 6, 5, 4, 9, 10, 1, 14, 9, 16, 1, 20, 3, 10, 7, 12, 13, 10, 17, 2, 27, 10, 19, 6, 11, 4, 21, 10, 29, 4, 25, 6, 29, 16, 5, 18, 7, 20, 11, 14, 15, 22, 5, 24, 1, 26, 5, 28, 13, 20, 19, 14, 25, 12, 17, 8, 23, 12, 43, 8
Offset: 0

Views

Author

Thomas Ordowski, Aug 21 2014

Keywords

Comments

If every positive integer appears in the sequence infinitely often then the sequence b(n) is a permutation of all primes of the form x^2 + y^2.

Crossrefs

Cf. A100208.

Programs

  • PARI
    a244915(maxn) = {
      my(a=[1], b=[], an, bn);
      for(n=1, maxn,
        an=1;
        while(!(isprime(bn=an^2+a[#a]^2) && setsearch(b, bn)==0), an++);
        a=concat(a, an);
        b=setunion(b, [bn])
      );
      a
    }
    a244915(100) \\ Colin Barker, Aug 24 2014
    
  • Python
    from sympy import isprime
    A244915 = [1]
    blist = []
    for n in range(1, 100):
        a, b = 1, 1 + A244915[-1]**2
        while not isprime(b) or b in blist:
            b += 2*a+1
            a += 1
        blist.append(b)
        A244915.append(a)
    # Chai Wah Wu, Aug 28 2014

Extensions

More terms from Colin Barker, Aug 24 2014

A258742 With a(1) = 1, a(n) is the smallest positive number not already in the sequence such that a(n)^2 + a(n-1)^2 is not prime.

Original entry on oeis.org

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

Views

Author

Derek Orr, Jun 08 2015

Keywords

Comments

Believed to be a permutation of the natural numbers.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = {1}, k}, For[k = 2, k <= n, k++, i = 1; While[Or[PrimeQ[i^2 + a[[k - 1]]^2], MemberQ[a, i]], i++]; AppendTo[a, i]]; a]; f@ 120 (* Michael De Vlieger, Jun 10 2015 *)
  • PARI
    v=[1]; n=1; while(n<100, if(!isprime(n^2+v[#v]^2)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v
Showing 1-10 of 13 results. Next