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 71 results. Next

A102371 Numbers missing from A102370.

Original entry on oeis.org

1, 2, 7, 12, 29, 62, 123, 248, 505, 1018, 2047, 4084, 8181, 16374, 32755, 65520, 131057, 262130, 524279, 1048572, 2097133, 4194286, 8388587, 16777192, 33554409, 67108842, 134217711, 268435428, 536870885
Offset: 1

Views

Author

Philippe Deléham, Feb 13 2005

Keywords

Comments

Indices of negative numbers in A103122.
Write numbers in binary under each other; start at 2^k, read in upward direction with the first bit omitted and convert to decimal:
. . . . . . . . . . 0
. . . . . . . . . . 1
.. . . . . . . . . 10 < -- Starting here, the upward diagonal (first bit omitted) reads 1 -> 1
.. . . . . . . . . 11
. . . . . . . . . 100 < -- Starting here, the upward diagonal (first bit omitted) reads 10 -> 2
. . . . . . . . . 101
. . . . . . . . . 110
. . . . . . . . . 111
.. . . . . . . . 1000 < -- Starting here, the upward diagonal (first bit omitted) reads 111 -> 7
. . . . . . . . .1001
Thus a(n) = A102370(2^n - n) - 2^n.
Do we have a(n) = 2^n-1-A105033(n-1)? - David A. Corneth, May 07 2020

Crossrefs

Programs

  • Haskell
    a102371 n = a102371_list !! (n-1)
    a102371_list = map (a105027 . toInteger) $ tail a000225_list
    -- Reinhard Zumkeller, Jul 21 2012
  • Maple
    A102371:= proc (n) local t1, l; t1 := -n; for l to n do if `mod`(n-l,2^l) = 0 then t1 := t1+2^l end if end do; t1 end proc;
  • Python
    a=1
    for n in range(2,66):
        print(a, end=",")
        a ^= a+n
    # Alex Ratushnyak, Apr 21 2012
    

Formula

a(n) = -n + Sum_{ k >= 1, k == n mod 2^k } 2^k. - N. J. A. Sloane and David Applegate, Mar 22 2005. E.g. a(5) = -5 + 2^1 + 2^5 = 29.
a(2^k + k) -a(k) = 2^(2^k + k) - 2^k, with k>= 1.
a(1)=1, for n>1, a(n) = a(n-1) XOR (a(n-1) + n), where XOR is the bitwise exclusive-or operator. - Alex Ratushnyak, Apr 21 2012
a(n) = A105027(A000225(n)). - Reinhard Zumkeller, Jul 21 2012

Extensions

More terms from Benoit Cloitre, Mar 20 2005
a(16)-a(22) from Robert G. Wilson v, Mar 21 2005
a(15)-a(29) from David Applegate, Mar 22 2005

A103192 Trajectory of 1 under repeated application of the function n -> A102370(n).

Original entry on oeis.org

1, 3, 5, 15, 17, 19, 21, 31, 33, 35, 37, 47, 49, 51, 53, 63, 65, 67, 69, 79, 81, 83, 85, 95, 97, 99, 101, 111, 113, 115, 117, 127, 129, 131, 133, 143, 145, 147, 149, 159, 161, 163, 165, 175, 177, 179, 181, 191, 193, 195, 197, 207, 209, 211, 213, 223, 225, 227, 229, 239, 241
Offset: 1

Views

Author

Keywords

Comments

Agrees with A103127 for the first 511 terms, but then diverges. If a(n) is the present sequence and b(n) is A103127 we have:
.n...a(n)..b(n)..difference
.....................
509, 2033, 2033, 0
510, 2035, 2035, 0
511, 2037, 2037, 0
512, 4095, 2047, 2048
513, 4097, 2049, 2048
514, 4099, 2051, 2048
515, 4101, 2053, 2048
516, 4111, 2063, 2048
.....................
The sequence may be computed as follows (from Philippe Deléham, May 08 2005).
Start with -1, 1. Then add powers of 2 whose exponent n is not in A034797: 1, 3, 11, 2059, 2^2059 + 2059, ... This gives
Step 0: -1, 1
Step 1: add 2^2 = 4, getting 3, 5 and thus -1, 1, 3, 5.
Step 2: add 2^4 = 16, getting 15, 17, 19, 21 and thus -1, 1, 3, 5, 15, 17, 19, 21
Step 3: add 2^5 = 32, getting 31, 33, 35, 37, 47, 49, 51, 53 and thus -1, 1, 3, 5, 15, 17, 19, 21, 31, 33, 35, 37, 47, 49, 51, 53, etc.
The jump 2037 --> 4095 for n = 510 -> 511 is explained by the fact that we pass directly from 2^10 to 2^12 since 11 belongs to A034797.
The trajectories of 2 (A103747) and 7 (A103621) may surely be obtained in a similar way.

Programs

  • Haskell
    a103192 n = a103192_list !! (n-1)
    a103192_list = iterate (fromInteger . a102370) 1
    -- Reinhard Zumkeller, Jul 21 2012

A103747 Trajectory of 2 under repeated application of the map n -> A102370(n).

Original entry on oeis.org

2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 254, 258, 262, 266, 270, 274, 278, 282, 286, 290, 294, 298, 302, 306, 310, 314, 382, 386, 390, 394, 398, 402, 406, 410, 414, 418, 422
Offset: 1

Views

Author

Benoit Cloitre and David Applegate, Mar 25 2005

Keywords

Comments

Although it initially appears that a(n)-8n is the 16-periodic sequence {-2,-6,-10,-14,-18,-22,-26,-30,-34,-38,-42,-46,-50,-54,6,2}, this pattern eventually breaks down. However, the first divergence occurs beyond the first 400 million terms.
(a(n)) agrees with the 16-periodic sequence up to a(2^67-1) = 2^70 - 70, but then diverges with a(2^67) = 2^71 - 2. - Charlie Neder, Feb 07 2019

Crossrefs

Trajectories of other numbers: A103192 (1), A103621 (7), A158953 (12), A159887 (29).

Programs

  • Haskell
    a103747 n = a103747_list !! (n-1)
    a103747_list = iterate (fromInteger . a102370) 2
    -- Reinhard Zumkeller, Jul 21 2012

Extensions

Edited by Peter Munn, Jan 13 2024

A103621 Trajectory of 7 under repeated application of the map n -> A102370(n).

Original entry on oeis.org

7, 9, 11, 13, 23, 25, 27, 61, 71, 73, 75, 77, 87, 89, 91, 125, 135, 137, 139, 141, 151, 153, 155, 189, 199, 201, 203, 205, 215, 217, 219, 253, 263, 265, 267, 269, 279, 281, 283, 317, 327, 329, 331, 333, 343, 345, 347, 381, 391, 393, 395, 397, 407, 409, 411, 445
Offset: 1

Views

Author

Philippe Deléham, Mar 31 2005

Keywords

Comments

Initially, first differences are 8-periodic: 2,2,2,10,2,2,34,10. [Unsigned comment made accurate by Peter Munn, Jan 13 2024]

Crossrefs

Cf. A102370.
Trajectories of other numbers A103192 (1), A103747 (2), A158953 (12), A159887 (29).

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[ Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s + n]; NestList[f, 7, 55] (* Robert G. Wilson v, Mar 30 2005 *)

Formula

Conjectures from Chai Wah Wu, Feb 01 2018: (Start)
a(n) = a(n-1) + a(n-8) - a(n-9) for n > 9.
G.f.: x*(3*x^8 + 34*x^7 + 2*x^6 + 2*x^5 + 10*x^4 + 2*x^3 + 2*x^2 + 2*x + 7)/(x^9 - x^8 - x + 1). (End)
The above conjectures are incompatible with A102370(2^37-37) = 2^38-3. - Peter Munn, Jan 13 2024

Extensions

More terms from Robert G. Wilson v, Mar 30 2005

A104235 Numbers n such that A102370(n) = n.

Original entry on oeis.org

0, 4, 8, 16, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 72, 80, 84, 88, 96, 100, 104, 112, 116, 120, 128, 132, 136, 144, 148, 152, 160, 164, 168, 176, 180, 184, 192, 196, 200, 208, 212, 216, 224, 228, 232, 240, 244, 256, 260, 264, 272, 276, 280, 288, 292, 296, 304, 308, 312
Offset: 1

Views

Author

N. J. A. Sloane, Apr 02 2005

Keywords

Comments

See A103543 and A103584 for much more about this sequence.
Indices of the 0 values in A103863.

Crossrefs

Cf. A102370, A103543, A103584. Dividing by 4 gives A104401.

Programs

  • Haskell
    a104235 n = a104235_list !! (n-1)
    a104235_list = [x | x <- [0..], a102370 x == toInteger x]
    -- Reinhard Zumkeller, Jul 21 2012

A103542 Binary equivalents of A102370.

Original entry on oeis.org

0, 11, 110, 101, 100, 1111, 1010, 1001, 1000, 1011, 1110, 1101, 11100, 10111, 10010, 10001, 10000, 10011, 10110, 10101, 10100, 11111, 11010, 11001, 11000, 11011, 11110, 111101, 101100, 100111, 100010, 100001, 100000, 100011, 100110, 100101
Offset: 0

Views

Author

N. J. A. Sloane, Mar 23 2005

Keywords

Comments

The number of 1's in the n-th term appears to match A089400. - Benoit Cloitre, Mar 24 2005

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; Table[ FromDigits[ IntegerDigits[f[n] + n, 2]], {n, 0, 35}] (* Robert G. Wilson v, Mar 23 2005 *)
  • Python
    def a(n): return '0' if n<1 else bin(sum([(n + k)&(2**k) for k in range(len(bin(n)[2:]) + 1)]))[2:] # Indranil Ghosh, May 03 2017

Extensions

More terms from Robert G. Wilson v and Benoit Cloitre, Mar 23 2005

A103122 Define a 1-1 correspondence between the integers Z and the nonnegative integers N by f(n) = A102370(n) if n >= 0, f(n) = A102371(-n) if n < 0; sequence gives a(n) = f^(-1)(n) for n >= 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 24 2005

Keywords

Comments

A 1-1 map from the nonnegative integers to all integers.
Simply stated: a(n) = index of n in A102370 if it is a member, else minus its index in the complement A102371. - M. F. Hasler, Apr 14 2022

Programs

  • PARI
    A103122(n)=if(n<0,0,s=-n;while(abs(if(sign(s)+1,2^s-1/2-1/2*sum(k=0,s,(-1)^floor((s+k)/2^k)*2^k),2^(-s-1)-1/2+1/2*sum(k=0,-s-1,(-1)^floor((-s-1-k)/2^k)*2^k))-n)>0,s++);s) \\ Benoit Cloitre, Mar 29 2005

Extensions

More terms from Benoit Cloitre, Mar 29 2005

A103529 Values of A102370 which are >= a new power of 2.

Original entry on oeis.org

0, 3, 6, 15, 28, 61, 126, 251, 504, 1017, 2042, 4095, 8180, 16373, 32758, 65523, 131056, 262129, 524274, 1048567, 2097148, 4194285, 8388590, 16777195, 33554408, 67108841, 134217706, 268435439, 536870884, 1073741797, 2147483622
Offset: 1

Views

Author

N. J. A. Sloane and David Applegate, Mar 22 2005

Keywords

Examples

			The initial values of A102370 are 0*, 3*, 6*, 5, 4, 15*, 10, 9, 8, 11, 14, 13, 28*, 23, ... and the starred terms are those which exceed the next power of 2. Their indices (except for the zero term) are given by A000325.
		

Crossrefs

Programs

  • Python
    a=3
    print(0, end=',')
    for i in range(2,55):
        print(a, end= ',')
        a ^= a+i
    # Alex Ratushnyak, Apr 21 2012

Formula

a(n) = 2^(n-1) - (n-1) + Sum_{ k >= 1, k == n-1 mod 2^k } 2^k.
a(n+1) = 2^n + A102371(n) for n>=1. a(n) = 2^n - A103530(n). - Philippe Deléham, Mar 30 2005
a(0)=0, a(1)=3, for n>1, a(n)= a(n-1) XOR (a(n-1)+n), where XOR is the bitwise exclusive-or operator. - Alex Ratushnyak, Apr 21 2012

A158953 Trajectory of 12 under repeated application of the map n -> A102370(n).

Original entry on oeis.org

12, 28, 44, 60, 76, 92, 108, 124, 140, 156, 172, 188, 204, 220, 236, 252, 268, 284, 300, 316, 332, 348, 364, 380, 396, 412, 428, 444, 460, 476, 492, 508, 524, 540, 556, 572, 588, 604, 620, 636, 652, 668, 684, 700, 716, 732, 748, 764, 780, 796, 812, 828, 844
Offset: 1

Views

Author

Philippe Deléham, Apr 01 2009

Keywords

Comments

Coincides with A098502 for at least 1400 terms. - R. J. Mathar, Apr 16 2009
Agrees with A098502 for the first 65535 terms. A098502(65535) = a(65535) = 1048556 = 2^20 - 20. A098502(65536) = 1048572 = 2^20 - 4; a(65536) = 2097148 = 2^21 - 4. - Philippe Deléham, Jan 05 2023

Crossrefs

Trajectories of other numbers: A103192 (1), A103747 (2), A103621 (7), A159887 (29).

A159887 Trajectory of 29 under repeated application of the map n -> A102370(n).

Original entry on oeis.org

29, 39, 41, 43, 45, 55, 57, 59, 93, 103, 105, 107, 109, 119, 121, 251, 285, 295, 297, 299, 301, 311, 313, 315, 349, 359, 361, 363, 365, 375, 377, 507, 541, 551, 553, 555, 557, 567, 569, 571, 605, 615, 617, 619, 621, 631, 633, 763, 797, 807, 809, 811, 813, 823, 825
Offset: 1

Views

Author

Philippe Deléham, Apr 25 2009

Keywords

Comments

Not the same as A159888: see the comments in A159888.
The divergence from A159888 follows from Theorem 3.1 in the Applegate, Cloitre, Deléham and Sloane link: in general, the first differences of an A102370 trajectory cannot be a cycle. - Peter Munn, Jan 14 2024

Crossrefs

Trajectories of other numbers: A103192 (1), A103747 (2), A103621 (7), A158953 (12).

Extensions

Missing term 617 inserted by Georg Fischer, Nov 28 2023
Showing 1-10 of 71 results. Next