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 31-40 of 47 results. Next

A350601 Array read by antidiagonals: row n lists even numbers that are "generated" (in Kaprekar's sense) in all bases 2, 4, 6, ..., 2n.

Original entry on oeis.org

0, 0, 2, 0, 2, 8, 0, 2, 10, 10, 0, 2, 10, 12, 12, 0, 2, 10, 14, 14, 14, 0, 2, 10, 14, 16, 16, 16, 0, 2, 10, 14, 22, 22, 22, 20, 0, 2, 10, 14, 22, 24, 24, 24, 22, 0, 2, 10, 14, 22, 24, 28, 28, 26, 24
Offset: 1

Views

Author

N. J. A. Sloane, Jan 08 2022

Keywords

Comments

Max Alekseyev's PARI "Gen" program (see A010061) is essential for computing the rows. Cf. A349833.

Examples

			The initial rows of the array are:
  0, 2,  8, 10, 12, 14, 16, 20, 22, 24, 26, 28, 34, 36, 38, 40, 42, 44, 50, 52,  ... [the even terms of A228082]
  0, 2, 10, 12, 14, 16, 22, 24, 26, 28, 34, 36, 38, 40, 44, 50, 58, 60, 62, 66  ... [A349831]
  0, 2, 10, 14, 16, 22, 24, 28, 34, 36, 38, 44, 50, 58, 60, 62, 66, 68, 72, 74,  ... [A349832]
  0, 2, 10, 14, 22, 24, 28, 36, 38, 44, 50, 58, 60, 62, 66, 68, 74, 76, 82, 84,  ... [A349833]
  0, 2, 10, 14, 22, 24, 28, 36, 38, 44, 50, 58, 60, 62, 66, 68, 74, 76, 82, 84,  ...
  0, 2, 10, 14, 22, 28, 36, ...
  0, 2, 10, 14, 22, 36, ...
  0, 2, 10, 14, 22, 36,...
  0, 2, 10, 14, 22, ...
...
The rows converge to A230624, which is
  0, 2, 10, 14, 22, 38, 62, 94, 158, 206, 318, 382, 478, 606, 766, 958, 1022, ...
The initial antidiagonals are:
  0,
  0, 2,
  0, 2, 8,
  0, 2, 10, 10,
  0, 2, 10, 12, 12,
  0, 2, 10, 14, 14, 14,
  0, 2, 10, 14, 16, 16, 16,
  0, 2, 10, 14, 22, 22, 22, 20,
  0, 2, 10, 14, 22, 24, 24, 24, 22,
  0, 2, 10, 14, 22, 24, 28, 28, 26, 24,
  ...
		

Crossrefs

The first few rows of the array are A228082 (even terms only), A349831, A349832, and A349833.

Extensions

[Needs checking and extending]

A227359 Natural numbers that are not of the form (k +- sum of binary digits of k) for any k.

Original entry on oeis.org

6, 13, 21, 30, 37, 48, 51, 80, 83, 111, 121, 133, 144, 147, 175, 185, 192, 207, 217, 226, 233, 242, 245, 248, 250, 272, 275, 303, 313, 320, 335, 345, 354, 361, 370, 373, 376, 378, 387, 399, 409, 418, 425, 434, 437, 440, 442, 457, 466, 469, 472, 474, 481, 488, 490, 497, 505, 507, 528, 531, 559, 569, 576, 591, 601, 610, 617
Offset: 1

Views

Author

Andres M. Torres, Jul 08 2013

Keywords

Comments

This sequence is the intersection of sets A010061 and A055938, where: set A010061 is NONE of ( k + count of set binary bits(k) ), and set A055938 is NONE of ( k - count of set binary bits(k) ), for any k.
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 1, 9, 127, 1362, 12921, 128429, 1261747, 12554142, 125697648, 1257065977, ... . Conjecture: This sequence has an asymptotic density (1/2) * A242403 = 0.126330... . - Amiram Eldar, Oct 02 2022

Examples

			Find the list of values not defined by:
V = i +- count of set binary bits(i), for any integer i.
Assume that setbits(n) returns the count of set binary digits of n.
A227359 sample: 6,13,21,30,37,48,51,80,83,111, ...
0 +- setbits(0) = 0     therefore 0 does not make the list
1 +- setbits(1) = 0,2   therefore 0 and 2 do not make the list
2 +- setbits(2) = 1,3   therefore 1 and 3 do not make the list
3 +- setbits(3) = 1,5   therefore 1 and 5 do not make the list
4 +- setbits(4) = 3,5   ...
5 +- setbits(5) = 3,7   therefore 3 and 7 do not make the list
6 +- setbits(6) = 4,8   therefore 4 and 8 do not make the list
7 +- setbits(7) = 4,10  therefore 4 and 10 do not make the list
8 +- setbits(8) = 7,9   therefore 7 and 9 do not make the list
6 and 13 did make the list because there is no solution for
6 = i +- setbits(i),  nor
13 = i +- setbits(i), for any integer i.
		

Crossrefs

Programs

  • Blitz3D
    ;; See link.

A227361 If n is even, then a(n) = n + bitsum(n), else a(n) = n - bitsum(n), where bitsum(n) is the count of binary 1's in n, A000120.

Original entry on oeis.org

0, 0, 3, 1, 5, 3, 8, 4, 9, 7, 12, 8, 14, 10, 17, 11, 17, 15, 20, 16, 22, 18, 25, 19, 26, 22, 29, 23, 31, 25, 34, 26, 33, 31, 36, 32, 38, 34, 41, 35, 42, 38, 45, 39, 47, 41, 50, 42, 50, 46, 53, 47, 55, 49, 58, 50, 59, 53, 62, 54, 64, 56, 67, 57, 65, 63, 68, 64, 70, 66, 73, 67, 74, 70, 77, 71, 79, 73, 82, 74, 82, 78, 85, 79, 87, 81, 90, 82, 91, 85
Offset: 0

Views

Author

Andres M. Torres, Jul 08 2013

Keywords

Comments

I gathered together some interesting statistics for this seq A227361:
Within the first 200000001 members of this sequence, only 70 were repeated 4 times, and then only when n > 2 million. None were repeated 5 times.
The first value to become repeated 3 times is 50, occurring at indexes (n=) 46, 48, and 55.
The first value to become repeated 4 times is 2097170, occurring at indexes (n=) 2097150, 2097166, 2097168, and 2097175.
The total count of those only occurring once is 96226727, or about 48.11 %.
Total count of those repeated 2 times is 45055158.
Total count of those repeated 3 times is 4554221, or about 2.28 %.
Total count of those repeated 4 times is 70 (extremely low).
Repeatedly applying this BitStoneA(v) function to values in a recursive (nested) style has shown that only 21 starting values shall become zero. These are those values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 23, 27. All other values shall cycle forever in small loops.
274877906962 is the smallest number that occurs 5 times. - Donovan Johnson, Jul 27 2013

Examples

			a(0) = 0 because 0 is even, so 0 + bitsum(0) = 0.
a(1) = 0 because 1 is odd, so 1 - bitsum(1) = 0.
a(2) = 3 because 2 is even, so 2 + bitsum(2) = 3.
a(3) = 1 because 3 is odd, so 3 - bitsum(3) = 1.
		

Crossrefs

Programs

  • Blitz3D
    ;; Each a(n) is generated simply as follows:  a(n) = BitStoneA(n)
    Function BitStoneA(n)
             If  (n Mod 2)              ;; if is odd
                     Return n-bitsum(n)
             Else                       ;; if is even
                     Return n+bitsum(n)
             End If
    End Function
    ;; --- Or, If n is even, then return n+A000120(n), else return n-A000120(n), where A000120(n) = bitsum(n)
    
  • Mathematica
    Table[n + (-1)^n DigitCount[n, 2, 1], {n, 0, 127}] (* Alonso del Arte, Jul 08 2013 *)
  • PARI
    a(n)=n+(-1)^(n%2)*hammingweight(n) \\ Charles R Greathouse IV, Jul 09 2013

Formula

a(n) = n + (-1)^n * Sum_{j = 1 .. floor(log_2(n)) + 1} (floor(n/2^j + 1/2) - floor(n/2^j)). - Alonso del Arte, Jul 08 2013, based on one of Hieronymus Fischer's formulas for A000120.

A227408 Set of all n, where n = r(s(n)) = s(r(n)), given that r(n) = n+bitcount(n), s(n) = n-bitcount(n), and bitcount(n) is the count of binary 1's in n.

Original entry on oeis.org

0, 22, 25, 38, 41, 70, 73, 134, 137, 237, 243, 262, 265, 365, 371, 429, 435, 461, 467, 492, 494, 498, 501, 518, 521, 621, 627, 685, 691, 717, 723, 748, 750, 754, 757, 813, 819, 845, 851, 876, 878, 882, 885, 909, 915, 940, 942, 946, 949, 972, 974, 978, 981, 988, 995, 1002, 1009, 1030, 1033, 1133, 1139, 1197, 1203, 1229
Offset: 1

Views

Author

Andres M. Torres, Jul 10 2013

Keywords

Comments

This is a simple sequence where the nesting of functions r(n), and s(n), are grouped in a special way: n = r(s(n)) = s(r(n)), and those three values must be equal.

Examples

			0  = r(s(0)) = s(r(0))  = r(0)  = s(0)  = 0.
22 = r(s(22))= s(r(22)) = r(19) = s(25) = 22.
25 = r(s(25))= s(r(25)) = r(22) = s(28) = 25.
38 = r(s(38))= s(r(38)) = r(35) = s(41) = 38.
		

Crossrefs

Programs

  • PARI
    npbc(n) = n + hammingweight(n)
    nmbc(n) = n - hammingweight(n)
    isok(n) = (n == npbc(nmbc(n))) && (n == nmbc(npbc(n))) \\ Michel Marcus, Aug 08 2013

Formula

Find all n, such that: n = r(s(n)) = s(r(n)), where r(n) = n+bitcount(n) and s(n) = n-bitcount(n)

Extensions

Offset changed from 0 to 1 by Michel Marcus, Aug 08 2013

A349832 Even numbers that are "generated" (in Kaprekar's sense) in all three bases 2, 4, and 6.

Original entry on oeis.org

0, 2, 10, 14, 16, 22, 24, 28, 34, 36, 38, 44, 50, 58, 60, 62, 66, 68, 72, 74, 76, 82, 84, 92, 94, 96, 98, 106, 108, 110, 118, 120, 122, 126, 132, 134, 136, 140, 146, 154, 156, 158, 162, 164, 170, 176, 178, 186, 196, 198, 202, 206, 210, 214, 216, 222, 228, 234, 238, 244, 246, 252, 256, 258, 260
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2022

Keywords

Comments

Using Max Alekseyev's PARI "Gen" program (see A010061), we run
vector(500,k,length(Gen(k,2))),
vector(500,k,length(Gen(k,4))), and
vector(500,k,length(Gen(k,6)))
to find the numbers that are generated in bases 2, 4, and 6, and then take the even numbers that are common to all three lists.

Crossrefs

A230624 is a subsequence.
A row of A350601.

A349833 Even numbers that are "generated" (in Kaprekar's sense) in all four bases 2, 4, 6, and 8.

Original entry on oeis.org

0, 2, 10, 14, 22, 24, 28, 36, 38, 44, 50, 58, 60, 62, 66, 68, 74, 76, 82, 84, 92, 94, 96, 98, 106, 110, 118, 120, 122, 132, 134, 136, 140, 154, 156, 158, 162, 170, 176, 178, 186, 196, 198, 206, 210, 214, 216, 222, 228, 234, 244, 246, 252, 258, 260, 262, 264, 268, 274, 284, 286
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2022

Keywords

Comments

Using Max Alekseyev's PARI "Gen" program (see A010061), we run
vector(500,k,length(Gen(k,2))),
vector(500,k,length(Gen(k,4))),
vector(500,k,length(Gen(k,6))),
vector(500,k,length(Gen(k,8))),
to find the numbers that are generated in bases 2, 4, 6, and 8, and then take the even numbers that are common to all four lists.

Crossrefs

A230624 is a subsequence.
A row of A350601.

A374101 Numbers k such that k and k+2 are both self numbers (A003052).

Original entry on oeis.org

1, 3, 5, 7, 108, 209, 310, 411, 512, 613, 714, 815, 916, 1109, 1210, 1311, 1412, 1513, 1614, 1715, 1816, 1917, 2110, 2211, 2312, 2413, 2514, 2615, 2716, 2817, 2918, 3111, 3212, 3313, 3414, 3515, 3616, 3717, 3818, 3919, 4112, 4213, 4314, 4415, 4516, 4617, 4718
Offset: 1

Views

Author

Amiram Eldar, Jun 28 2024

Keywords

Comments

The least difference between consecutive self numbers is 2 (see Griffin N. Macris's proof at A010061 that may be adapted to other bases).

Crossrefs

Subsequence of A003052.
Cf. A010061, A339216 (binary analog).

Programs

  • Mathematica
    seq[max_] := Module[{c = Complement[Range[max], Table[n + DigitSum[n], {n, 1, max}]], d, ind}, d = Differences[c]; ind = Position[d, 2] // Flatten; c[[ind]]]; seq[5000]

A232228 a(1)=1; thereafter a(n) = 2^(number of bits in binary expansion of a(n-1)) + 1 + a(n-1).

Original entry on oeis.org

1, 4, 13, 30, 63, 128, 385, 898, 1923, 3972, 8069, 16262, 32647, 65416, 130953, 262026, 524171, 1048460, 2097037, 4194190, 8388495, 16777104, 33554321, 67108754, 134217619, 268435348, 536870805, 1073741718, 2147483543, 4294967192, 8589934489, 17179869082, 34359738267, 68719476636
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2013

Keywords

Comments

An infinite subsequence of A010061.

Crossrefs

Cf. A010061.

Programs

  • Maple
    f:=proc(n) option remember; if n=1 then 1 else 2^(nops(convert(f(n-1),base,2)))+1+f(n-1); fi; end;
    [seq(f(n),n=1..40)];
  • Mathematica
    NestList[2^IntegerLength[#,2]+1+#&,1,40] (* Harvey P. Dale, May 05 2020 *)

A374102 Prime binary self (or Colombian) numbers: primes not expressible as the sum of an integer and its binary weight.

Original entry on oeis.org

13, 23, 37, 71, 83, 97, 113, 233, 311, 313, 337, 359, 373, 401, 409, 449, 457, 499, 569, 593, 599, 601, 617, 641, 643, 739, 761, 809, 821, 853, 881, 883, 929, 947, 953, 977, 1103, 1129, 1153, 1193, 1217, 1237, 1249, 1297, 1303, 1319, 1321, 1429, 1459, 1489, 1499
Offset: 1

Views

Author

Amiram Eldar, Jun 28 2024

Keywords

Crossrefs

Intersection of A000040 and A010061.
A374103 is a subsequence.
Cf. A000120, A006378 (decimal analog).

Programs

  • Mathematica
    With[{m = 240}, Complement[Prime[Range[m]], Table[n + DigitCount[n, 2, 1], {n, 0, Prime[m]}]]]

A374103 Numbers k such that k and k+2 are both prime binary self (or Colombian) numbers (A374102).

Original entry on oeis.org

311, 599, 641, 881, 1319, 1697, 1721, 2657, 2969, 3257, 4019, 4127, 4337, 4721, 5009, 6449, 6569, 6689, 6761, 7547, 9041, 9239, 10457, 10529, 11171, 11699, 11939, 13691, 16229, 19379, 20147, 20357, 20477, 22697, 23057, 24977, 25169, 26249, 26681, 26729, 27059
Offset: 1

Views

Author

Amiram Eldar, Jun 28 2024

Keywords

Crossrefs

Subsequence of A001359, A339216 and A374102.

Programs

  • Mathematica
    seq[max_] := Module[{c = Complement[Prime[Range[max]], Table[n + DigitCount[n, 2, 1], {n, 0, Prime[max]}]], d, ind}, d = Differences[c]; ind = Position[d, 2] // Flatten; c[[ind]]]; seq[3000]
Previous Showing 31-40 of 47 results. Next