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.

Previous Showing 11-16 of 16 results.

A207460 Let a(1) = 4. For n > 1, a(n) is the least number greater than a(n-1) such that the Hamming distance D(a(n-1),a(n)) = 4.

Original entry on oeis.org

4, 11, 16, 31, 35, 44, 49, 62, 70, 73, 82, 93, 97, 110, 112, 127, 143, 145, 158, 162, 173, 176, 191, 199, 200, 211, 220, 224, 239, 241, 254, 286, 290, 301, 304, 319, 327, 328, 339, 348, 352, 367, 369, 382, 398, 400, 415, 419
Offset: 1

Views

Author

Vladimir Shevelev, Feb 18 2012

Keywords

Comments

All terms are odious (A000069).

Crossrefs

Programs

  • Mathematica
    nxt[n_]:=Module[{k=n+1},While[HammingDistance[PadLeft[IntegerDigits[ n,2],IntegerLength[ k,2]],IntegerDigits[k,2]]!=4,k++];k]; NestList[ nxt,4,50] (* Harvey P. Dale, Nov 07 2020 *)

A207472 Let a(1) = 5. For n > 1, a(n) is the least number greater than a(n-1) such that the Hamming distance D(a(n-1),a(n)) = 5.

Original entry on oeis.org

5, 26, 33, 62, 66, 93, 96, 127, 135, 152, 163, 188, 192, 223, 225, 254, 270, 273, 294, 313, 320, 351, 353, 382, 390, 409, 418, 445, 449, 478, 480, 511, 543, 545, 574, 578, 605, 608, 639, 647, 664, 675, 700, 704, 735, 737, 766, 782, 785, 806, 825, 832, 863, 865
Offset: 1

Views

Author

Vladimir Shevelev, Feb 18 2012

Keywords

Comments

Odious and evil terms are alternating (cf. A000069, A001969).

Crossrefs

Programs

  • Mathematica
    a[1] = 5; a[n_] := a[n] = Module[{k = a[n - 1], m = a[n-1] + 1}, While[DigitCount[BitXor[k, m], 2, 1] != 5, m++]; m]; Array[a, 100] (* Amiram Eldar, Aug 06 2023 *)

A209332 a(n) is the minimal positive number k such that n<+>k is prime or 0 if no such number exists (operation <+> defined in A206853).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 3, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1, 1, 1, 2, 4, 0, 3, 2, 1, 0, 4, 1, 1, 1, 1, 1, 2, 1, 1, 0, 5, 0, 3, 2, 1, 0, 7, 2, 2, 1, 1, 2, 1, 0, 8, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 0, 7, 1, 2, 1, 1, 3, 2, 1, 1, 0, 3, 0, 4, 3
Offset: 1

Views

Author

Vladimir Shevelev, Mar 06 2012

Keywords

Comments

Numbers n for which a(n) = 1 form sequence A208982.
a(n) = 0 for n = 25, 33, 37, 47,... (A209333).
A simple sufficient condition for a(n) = 0 (which is proved by induction) is that n<+>k is not prime up to the moment that n<+>k is even and n<+>(k+1)-n<+>k = 2^t, where t >= m+1 and m defined by the condition 2^m <= n < 2^(m+1).
Conjecture: for even n, a(n) > 0.

Crossrefs

A210566 Primes not expressed in form n<+>4, where operation <+> defined in A206853.

Original entry on oeis.org

2, 3, 5, 7, 23, 37, 53, 101, 103, 131, 149, 151, 167, 181, 229, 257, 263, 277, 293, 311, 359, 373, 389, 421, 439, 487, 503, 599, 613, 631, 641, 643, 647, 661, 677, 727, 743, 757, 769, 773, 821, 823, 853, 887, 919, 983, 997, 1013, 1031, 1061, 1063
Offset: 1

Views

Author

Keywords

Comments

Or primes p such that, for any nonnegative integer n

Programs

  • Mathematica
    hammingDistance[a_, b_] := Count[IntegerDigits[BitXor[a, b], 2], 1]; (* binary Hamming distance *) vS[a_,b_] := NestWhile[#+1&, a, hammingDistance[a,#] =!= b&]; (* vS[a_,b_] is the least c>=a,such that the binary Hamming distance D(a,c)=b. vS[a,b] is Vladimir's a<+>b *) A210566 = Map[Prime[#]&, Complement[Range[Max[#]], #]&[Map[PrimePi[#]&, Union[Map[#[[2]]&, Cases[Map[{PrimeQ[#],#}&[vS[#,4]]&, Range[7000]],{True,}]]]]]] (* _Peter J. C. Moses, Apr 02 2012 *)

A123079 Twin primes of form 4k+1.

Original entry on oeis.org

5, 13, 17, 29, 41, 61, 73, 101, 109, 137, 149, 181, 193, 197, 229, 241, 269, 281, 313, 349, 421, 433, 461, 521, 569, 601, 617, 641, 661, 809, 821, 829, 857, 881, 1021, 1033, 1049, 1061, 1093, 1153, 1229, 1277, 1289, 1301, 1321, 1429, 1453, 1481, 1489, 1609
Offset: 1

Author

Miklos Kristof, Sep 27 2006

Keywords

Crossrefs

Programs

  • Maple
    a[1]:=5:i:=2:for k from 6 to 3000 do if isprime(k) and isprime(k+2) then b:=k:c:=k+2: if b mod 4 = 1 then a[i]:=b:i:=i+1 fi: if c mod 4 = 1 then a[i]:=c:i:=i+1 fi:fi od: seq(a[n],n=1..i-1);
  • Mathematica
    Select[Union[Flatten[Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&]]],Mod[ #,4]==1&] (* Harvey P. Dale, Oct 16 2022 *)

A123080 Twin primes of form 4k+3.

Original entry on oeis.org

3, 7, 11, 19, 31, 43, 59, 71, 103, 107, 139, 151, 179, 191, 199, 227, 239, 271, 283, 311, 347, 419, 431, 463, 523, 571, 599, 619, 643, 659, 811, 823, 827, 859, 883, 1019, 1031, 1051, 1063, 1091, 1151, 1231, 1279, 1291, 1303, 1319, 1427, 1451, 1483, 1487, 1607
Offset: 1

Author

Miklos Kristof, Sep 27 2006

Keywords

Crossrefs

Programs

  • Maple
    i:=1:for k from 1 to 3000 do if isprime(k) and isprime(k+2) then b:=k:c:=k+2: if b mod 4 = 3 then a[i]:=b:i:=i+1 fi: if c mod 4 = 3 then a[i]:=c:i:=i+1 fi:fi od: seq(a[n],n=1..i-1);
  • Mathematica
    Select[Flatten[Select[Partition[Prime[Range[260]],2,1],Last[#]-First[#] == 2&]], IntegerQ[(#-3)/4]&]  (* Harvey P. Dale, Apr 20 2011 *)
Previous Showing 11-16 of 16 results.