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

A145819 Union of A145812 and A145818 with double repetition of 1, so that a(1)=1, a(2)=1.

Original entry on oeis.org

1, 1, 3, 5, 9, 11, 17, 21, 33, 35, 41, 43, 65, 69, 81, 85, 129, 131, 137, 139, 161, 163, 169, 171, 257, 261, 273, 277, 321, 325, 337, 341
Offset: 1

Views

Author

Vladimir Shevelev, Oct 20 2008

Keywords

Comments

Theorem. For every even integer m there exists a representation of the form m=a(r)+a(s). If A(x) is the counting function of a(n)<=x, then A(x)=O(sqrt(x))and Omega(sqrt(x)). Conjecture. The sequence is minimal in the following sense: if any sequence has the counting function B(x)<=A(x) for all x>=1 and B(x) < A(x) for x>=x_0, then there exists an even integer N which is not expressible as a sum of two terms of such sequence.

Crossrefs

A145849 a(n) = A145812(2n-1).

Original entry on oeis.org

1, 9, 33, 41, 129, 137, 161, 169, 513, 521, 545, 553, 641, 649, 673, 681, 2049, 2057, 2081, 2089, 2177, 2185, 2209, 2217, 2561, 2569, 2593, 2601, 2689, 2697, 2721, 2729, 8193, 8201, 8225, 8233, 8321, 8329, 8353, 8361, 8705, 8713, 8737, 8745, 8833, 8841, 8865, 8873, 10241
Offset: 1

Views

Author

Vladimir Shevelev, Oct 21 2008

Keywords

Comments

Every positive odd integer m==3 (mod 8) is a unique sum of the form a(s)+2a(t), while other odd integers are not expressible in this form.

Crossrefs

Bisection of A145812.

Programs

  • Mathematica
    a[n_] := 2 * FromDigits[IntegerDigits[2*n-2, 2], 4] + 1; Array[a, 50] (* Amiram Eldar, Dec 16 2018 *)
  • PARI
    a145812(n) = 2*fromdigits(binary(n-1), 4) + 1;
    a(n) = a145812(2*n-1); \\ Michel Marcus, Dec 13 2018

Formula

If f(x) = Sum_{n>=1}x^a(n), abs(x) < 1, then f(x)*f(x^2) = x^3/(1 - x^8).

Extensions

More terms from Michel Marcus, Dec 13 2018

A000695 Moser-de Bruijn sequence: sums of distinct powers of 4.

Original entry on oeis.org

0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, 85, 256, 257, 260, 261, 272, 273, 276, 277, 320, 321, 324, 325, 336, 337, 340, 341, 1024, 1025, 1028, 1029, 1040, 1041, 1044, 1045, 1088, 1089, 1092, 1093, 1104, 1105, 1108, 1109, 1280, 1281, 1284, 1285
Offset: 0

Views

Author

Keywords

Comments

Although this is a list, it has offset 0 for both historical and mathematical reasons.
Numbers whose set of base-4 digits is a subset of {0,1}. - Ray Chandler, Aug 03 2004, corrected by M. F. Hasler, Oct 16 2018
Numbers k such that the sum of the base-2 digits of k = sum of the base-4 digits of k. - Clark Kimberling
Numbers having the same representation in both binary and negabinary (A039724). - Eric W. Weisstein
This sequence has many other interesting and useful properties. Every term k corresponds to a unique pair i,j with k = a(i) + 2*a(j) (i=A059905(n), j=A059906(n)) -- see A126684. Every list of numbers L = [L1,L2,L3,...] can be encoded uniquely by "recursive binary interleaving", where f(L) = a(L1) + 2*a(f([L2,L3,...])) with f([])=0. - Marc LeBrun, Feb 07 2001
This may be described concisely using the "rebase" notation b[n]q, which means "replace b with q in the expansion of n", thus "rebasing" n from base b into base q. The present sequence is 2[n]4. Many interesting operations (e.g., 10[n](1/10) = digit reverse, shifted) are nicely expressible this way. Note that q[n]b is (roughly) inverse to b[n]q. It's also natural to generalize the idea of "basis" so as to cover the likes of F[n]2, the so-called "fibbinary" numbers (A003714) and provide standard ready-made images of entities obeying other arithmetics, say like GF2[n]2 (e.g., primes = A014580, squares = the present sequence, etc.). - Marc LeBrun, Mar 24 2005
a(n) is also equal to the product n X n formed using carryless binary multiplication (A059729, A063010). - Henry Bottomley, Jul 03 2001
Numbers k such that A004117(k) is odd. - Pontus von Brömssen, Nov 25 2008
Fixed point of the morphism: 0 -> 01; 1 -> 45; 2 -> 89; ...; n -> (4n)(4n+1), starting from a(0)=0. - Philippe Deléham, Oct 22 2011
If n is even and present, so is n+1. - Robert G. Wilson v, Oct 24 2014
Also: interleave binary digits of n with 0's. (Equivalent to the "rebase" interpretation above.) - M. F. Hasler, Oct 16 2018
Named after the Austrian-Canadian mathematician Leo Moser (1921-1970) and the Dutch mathematician Nicolaas Govert de Bruijn (1918-2012). - Amiram Eldar, Jun 19 2021
Conjecture: The sums of distinct powers of k > 2 can be constructed as the following (k-1)-ary rooted tree. For each n the tree grows and a(n) is then the total number of nodes. For n = 1, the root of the tree is added. For n > 1, if n is odd one leaf of depth n-2 grows one child. If n is even all leaves of depth >= (n - 1 - A000225(A001511(n/2))) grow the maximum number of children. An illustration is provided in the links. - John Tyler Rascoe, Oct 09 2022

Examples

			G.f.: x + 4*x^2 + 5*x^3 + 16*x^4 + 17*x^5 + 20*x^6 + 21*x^7 + 64*x^8 + ...
If n=27, then b_0=1, b_1=1, b_2=0, b_3=1, b_4=1. Therefore a(27) = 4^4 + 4^3 + 4 + 1 = 325; k = b_0 + b_2*2 + b_4*2^2 = 5, l = b_1 + b_3*2 = 3, such that a(5)=17, a(3)=5 and 27 = 17 + 2*5. - _Vladimir Shevelev_, Nov 10 2008
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

For generating functions Product_{k>=0} (1 + a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
Main diagonal of A048720, second column of A048723.
A062880(n) = 2*a(n); A001196(n) = 3*a(n).
Row 4 of array A104257.

Programs

  • C
    uint32_t a_next(uint32_t a_n) { return (a_n + 0xaaaaaaab) & 0x55555555; } /* Falk Hüffner, Jan 24 2022 */
  • Haskell
    a000695 n = if n == 0 then 0 else 4 * a000695 n' + b
                where (n',b) = divMod n 2
    -- Reinhard Zumkeller, Feb 21 2014, Dec 03 2011
    
  • Julia
    function a(n)
        m, r, b = n, 0, 1
        while m > 0
            m, q = divrem(m, 2)
            r += b * q
            b *= 4
        end
    r end; [a(n) for n in 0:51] |> println # Peter Luschny, Jan 03 2021
    
  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( (&+[4^k*x^(2^k)/(1+x^(2^k)): k in [0..20]])/(1-x) )); // G. C. Greubel, Dec 06 2018
    
  • Maple
    a:= proc(n) local m, r, b; m, r, b:= n, 0, 1;
          while m>0 do r:= r+b*irem(m, 2, 'm'); b:= b*4 od; r
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 16 2013
  • Mathematica
    Table[FromDigits[Riffle[IntegerDigits[n, 2], 0], 2], {n, 0, 51}] (* Jacob A. Siehler, Jun 30 2010 *)
    Table[FromDigits[IntegerDigits[n, 2], 4], {n, 0, 51}] (* IWABUCHI Yu(u)ki, Apr 06 2013 *)
    Union@ Flatten@ NestList[ Join[ 4#, 4# + 1] &, {0}, 6] (* Robert G. Wilson v, Aug 30 2014 *)
    Select[ Range[0, 1320], Total@ IntegerDigits[#, 2] == Total@ IntegerDigits[#, 4] &] (* Robert G. Wilson v, Oct 24 2014 *)
    Union[FromDigits[#,4]&/@Flatten[Table[Tuples[{0,1},n],{n,6}],1]] (* Harvey P. Dale, Oct 03 2015 *)
    a[ n_] := Which[n < 1, 0, EvenQ[n], a[n/2] 4, True, a[n - 1] + 1]; (* Michael Somos, Nov 30 2016 *)
  • PARI
    a(n)=n=binary(n);sum(i=1,#n,n[i]*4^(#n-i)) \\ Charles R Greathouse IV, Mar 04 2013
    
  • PARI
    {a(n) = if( n<1, 0, n%2, a(n-1) + 1, a(n/2) * 4)}; /* Michael Somos, Nov 30 2016 */
    
  • PARI
    A000695(n)=fromdigits(binary(n),4) \\ M. F. Hasler, Oct 16 2018
    
  • Python
    def a(n):
        n = bin(n)[2:]
        x = len(n)
        return sum(int(n[i]) * 4**(x - 1 - i) for i in range(x))
    [a(n) for n in range(101)] # Indranil Ghosh, Jun 25 2017
    
  • Python
    def a():
        x = 0
        while True:
            yield x
            y = ~(x << 1)
            x = (x - y) & y # Falk Hüffner, Dec 21 2021
    
  • Python
    from itertools import count, islice
    def A000695_gen(): # generator of terms
        yield (a:=0)
        for n in count(1):
            yield (a := a+((1<<((~n & n-1).bit_length()<<1)+1)+1)//3)
    A000695_list = list(islice(A000695_gen(),30)) # Chai Wah Wu, Feb 22 2023
    
  • Python
    def A000695(n): return int(bin(n)[2:],4) # Chai Wah Wu, Aug 21 2023
    
  • Sage
    s=(sum(4^k*x^(2^k)/(1+x^(2^k)) for k in range(10))/(1-x)).series(x, 60); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 06 2018
    

Formula

G.f.: 1/(1-x) * Sum_{k>=0} 4^k*x^2^k/(1+x^2^k). - Ralf Stephan, Apr 27 2003
Numbers k such that the coefficient of x^k is > 0 in Product_{n>=0} 1+x^(4^n). - Benoit Cloitre, Jul 29 2003
For n >= 1, a(n) = a(n-1) + (4^t+2)/6, where t is such that 2^t||2n,or t=A007814(2n). a(n) = (A145812(n+1) - 1)/2. - Vladimir Shevelev, Nov 07 2008
To get a(n), write n as Sum b_j*2^j, then a(n) = Sum b_j*2^(2j). The Diophantine equation a(k)+2a(l)=n has the unique solution: k=Sum b_(2j)*2^j, l=Sum b_(2j+1)*2^j. - Vladimir Shevelev, Nov 10 2008
If a(k)*a(l)=a(m), then k*l=m (the inverse, generally speaking, is not true). - Vladimir Shevelev, Nov 21 2008
Let F(x) be the generating function, then F(x)*F(x^2) = 1/(1-x). - Joerg Arndt, May 12 2010
a(n+1) = (a(n) + 1/3) & -1/3, where & is bitwise AND, -1/3 is represented as the infinite dyadic ...010101 (just as -1 is ...111111 in two's complement) and +1/3 is ...101011. - Marc LeBrun, Sep 30 2010
a(n) = Sum_{k>=0} {A030308(n,k)*b(k)} with b(k) = 4^k = A000302(k). - Philippe Deléham, Oct 18 2011
A182560(6*a(n)) = 0. - Reinhard Zumkeller, May 05 2012
G.f.: x/(1-x^2) + 4*x^2/((1-x)*(W(0) - 4*x - 4*x^2)), where W(k) = 1 + 4*x^(2^k) + 5*x^(2^(k+1)) - 4*x^(2^(k+1))*(1 + x^(2^(k+1)))^2/W(k+1); (continued fraction). - Sergei N. Gladkovskii, Jan 04 2014
liminf a(n)/n^2 = 1/3 and limsup a(n)/n^2 = 1. - Gheorghe Coserea, Sep 15 2015
Let f(x) = (Sum_{k=-oo..oo} floor(x*2^k)/4^k)/2. Then f(x) is a real-valued extension of a(n), which a(n) approximates in the sense that f(x) = lim_{k->oo} a(floor(x*2^k))/a(2^k). - Velin Yanev, Nov 28 2016
G.f. A(x) satisfies x/(1 - x^2) = A(x) - 4 * (1+x) * A(x^2). - Michael Somos, Nov 30 2016
a(2^k) = 4^k = A000302(k). a(n + 2^k) = a(n) + a(2^k) for 2^k > n >= 1. - David A. Corneth, Oct 16 2018
Sum_{n>=1} 1/a(n) = 1.886176434476107244547259512076353532930680508099044818673061351780360211128... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 12 2022

A145818 Odd positive integers a(n) such that for every integer m == 3 (mod 4) there exists a unique representation of the form m = a(l) + 2*a(s), but there are no such representations for m == 1 (mod 4).

Original entry on oeis.org

1, 5, 17, 21, 65, 69, 81, 85, 257, 261, 273, 277, 321, 325, 337, 341, 1025, 1029, 1041, 1045, 1089, 1093, 1105, 1109, 1281, 1285, 1297, 1301, 1345, 1349, 1361, 1365, 4097, 4101, 4113, 4117, 4161, 4165, 4177, 4181, 4353, 4357, 4369, 4373, 4417, 4421, 4433
Offset: 1

Views

Author

Vladimir Shevelev, Oct 20 2008, Oct 21 2008

Keywords

Comments

Theorem. A positive odd number is in the sequence iff in its binary expansion all bits in the k-th position from the end, for k=2, 4, 6, ..., are zeros. For example, 337, 341 have binary expansions 101010001, 101010101. Thus both of them are in the sequence. If A(x) is the counting function of a(n) <= x, then A(x)=O(sqrt(x))and Omega(sqrt(x)). If f(x) = Sum_{n>=1} x^a(n), abs(x) < 1, then f(x)*f(x^2) = x^3/(1-x^4); a(n) = 2*A145812(n) - 1.
Every positive odd integer m == 3 (mod 2^(2r)) is a unique sum of the form a(2^(r-1)*(s-1)+1) + a(2^(r-1)*(t-1)+1), r=1,2,..., while other odd integers are not expressible in such form (see also comment to A145812). - Vladimir Shevelev, Oct 21 2008
To get the decomposition of m=4k+3 as the sum a(l)+2*a(s), write m-2 as Sum b_j 2^j, then a(s) = 1 + Sum_{j odd} b_j 2^(j-1). For example, if m=55, then we have 53 = 2^0 + 2^2 + 2^4 + 2^5. Thus a(l) = 1 + 2^4 = 17 and the required decomposition is 55 = a(l) + 2*17, such that a(l)=21. We see that l=4, s=3, i.e., "index coordinates" of 55 are (4,3). Thus we have a one-to-one map of positive integers of the form 4k+3 to the positive lattice points on the plane. - Vladimir Shevelev, Oct 26 2008
Odd terms of A000695 (the Moser-de Bruijn sequence: sums of distinct powers of 4). - Jon E. Schoenfield, Mar 18 2021

Crossrefs

Programs

  • Mathematica
    aQ[n_] := OddQ[n] && Module[{d = Reverse[IntegerDigits[n, 2]]}, Length[d] < 2 || Max[d[[2;; -1;; 2]]] == 0]; Select[Range[4500], aQ] (* Amiram Eldar, Dec 15 2018 *)
  • PARI
    isok(n) = {if (n % 2, my(rb = Vecrev(binary(n)), brb = vector(#rb\2, k, rb[2*k])); (#brb == 0) || vecmax(brb) == 0, 0);} \\ Michel Marcus, Dec 15 2018

Extensions

Extended beyond a(16) by Klaus Brockhaus, Oct 22 2008

A088442 A linear version of the Josephus problem.

Original entry on oeis.org

1, 3, 1, 3, 9, 11, 9, 11, 1, 3, 1, 3, 9, 11, 9, 11, 33, 35, 33, 35, 41, 43, 41, 43, 33, 35, 33, 35, 41, 43, 41, 43, 1, 3, 1, 3, 9, 11, 9, 11, 1, 3, 1, 3, 9, 11, 9, 11, 33, 35, 33, 35, 41, 43, 41, 43, 33, 35, 33, 35, 41, 43, 41, 43, 129, 131, 129, 131, 137, 139, 137, 139, 129, 131
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2003

Keywords

Comments

Or a(n) is in A145812 such that (2*n + 3 - a(n))/2 is in A145812 as well. Note also that a(n) + 2*A090569(n+1) = 2*n + 3. - Vladimir Shevelev, Oct 20 2008

Examples

			If n=4, 2n+1 = 9 = 1 + 0*2 + 0*2^2 + 1*2^3, so a(4) = 1 + 0*2 + 1*2^3 = 9.
		

Crossrefs

Programs

Formula

To get a(n), write 2n+1 as Sum b_j 2^j, then a(n) = 1 + Sum_{j odd} b_j 2^j.
Equals A004514(n) + 1. - Chris Groer (cgroer(AT)math.uga.edu), Nov 10 2003
a(n) = 2*A063694(n) + 1. - G. C. Greubel, Dec 05 2022

Extensions

More terms from Emeric Deutsch, May 27 2004

A090569 The survivor w(n,2) in a modified Josephus problem, with a step of 2.

Original entry on oeis.org

1, 1, 3, 3, 1, 1, 3, 3, 9, 9, 11, 11, 9, 9, 11, 11, 1, 1, 3, 3, 1, 1, 3, 3, 9, 9, 11, 11, 9, 9, 11, 11, 33, 33, 35, 35, 33, 33, 35, 35, 41, 41, 43, 43, 41, 41, 43, 43, 33, 33, 35, 35, 33, 33, 35, 35, 41, 41, 43, 43, 41, 41, 43, 43, 1, 1, 3, 3, 1, 1, 3, 3, 9, 9, 11, 11, 9, 9, 11, 11, 1, 1
Offset: 1

Views

Author

John W. Layman, Dec 02 2003

Keywords

Comments

Arrange n persons {1,2,...,n} consecutively on a line rather than around in a circle. Beginning at the left end of the line, we remove every q-th person until we reach the end of the line. At this point we immediately reverse directions, taking care not to "double count" the person at the end of the line and continue to eliminate every q-th person, but now moving right to left. We continue removing people in this back-and-forth manner until there remains a lone survivor w(n,q).
Or a(n) is in A145812 such that 2n+1-2a(n) is in A145812 as well. Note also that 2a(n)+A088442(n-1)=2n+1. - Vladimir Shevelev, Oct 20 2008

Examples

			a(2)=11, since people are eliminated in the order 2, 4, 6, 8, 10, 12, 9, 5, 1, 7, 3, leaving 11 as the survivor.
		

Crossrefs

Programs

  • Python
    def A090569(n): return (n-1&((1<<(m:=(n-1).bit_length())+(m&1^1))-1)//3)+1 # Chai Wah Wu, Jan 30 2023

Formula

w(n, 2) = 1 + Sum_{odd j=1..k} b(j)*(2^j), where Sum_{j=0..k} b(j)*(2^j) is the binary expansion of either n or n-1, whichever is odd.
a(n) = A063695(n-1) + 1.

A146085 Positive integers a(n) such that for every integer m == 1 (mod 3), m >= 4, there exists a unique representation of m as a sum of the form a(l) + 3*a(s).

Original entry on oeis.org

1, 4, 7, 28, 31, 34, 55, 58, 61, 244, 247, 250, 271, 274, 277, 298, 301, 304, 487, 490, 493, 514, 517, 520, 541, 544, 547, 2188, 2191, 2194, 2215, 2218, 2221, 2242, 2245, 2248, 2431, 2434, 2437, 2458, 2461, 2464, 2485, 2488, 2491, 2674, 2677, 2680, 2701, 2704, 2707, 2728, 2731, 2734
Offset: 1

Views

Author

Vladimir Shevelev, Oct 27 2008

Keywords

Comments

Theorem. An integer is in the sequence iff in its expansion on base 3 all digits at the k-th position from the end, k=3, 5, 7, ..., are zeros while the first digit from the end is 1. To get the decomposition of m==1(mod 3) as sum a(l)+3a(s), write m-3 as Sum b_j 3^j, then a(l) = 1 + Sum_{j odd} b_j 3^j.

Examples

			If m=46, then we have 46=1*3^0+2*3^2+1*3^3, thus a(l)=1+1*3^3=28 and the required decomposition is: 46=28+3*4, such that a(s)=4. We see that l=4, s=2, i.e. "index coordinates" of 46 are (4, 2). Thus we have a one-to-one map of integers m==1(mod 3), m>=4, to the positive lattice points on the plane.
		

Crossrefs

Programs

  • PARI
    isok(n) = {my(d=Vecrev(digits(n, 3)), k=3); while (k <= #d, if (d[k], return (0)); k += 2;); d[1] == 1;} \\ Michel Marcus, Dec 09 2018

Extensions

More terms from Michel Marcus, Dec 09 2018

A145850 a(n) = A145818(2n-1).

Original entry on oeis.org

1, 17, 65, 81, 257, 273, 321, 337, 1025, 1041, 1089, 1105, 1281, 1297, 1345, 1361, 4097, 4113, 4161, 4177, 4353, 4369, 4417, 4433, 5121, 5137, 5185, 5201, 5377, 5393, 5441, 5457, 16385, 16401, 16449, 16465, 16641, 16657, 16705, 16721, 17409, 17425, 17473, 17489, 17665, 17681
Offset: 1

Views

Author

Vladimir Shevelev, Oct 21 2008

Keywords

Comments

Every positive odd integer m == 3 (mod 16) is a unique sum of the form a(s) + 2a(t), while other odd integers are not expressible in such form.

Crossrefs

Bisection of A145818.

Formula

If f(x) = Sum_{n>=1} x^a(n), abs(x) < 1, then f(x)*f(x^2) = x^3/(1-x^16).

Extensions

More terms from Michel Marcus, Dec 15 2018

A146087 a(n) = 3*A146085(n) - 1.

Original entry on oeis.org

2, 11, 20, 83, 92, 101, 164, 173, 182, 731, 740, 749, 812, 821, 830, 893, 902, 911, 1460, 1469, 1478, 1541, 1550, 1559, 1622, 1631, 1640, 6563, 6572, 6581, 6644, 6653, 6662, 6725, 6734, 6743, 7292, 7301, 7310, 7373, 7382, 7391, 7454, 7463, 7472, 8021, 8030, 8039, 8102, 8111, 8120
Offset: 1

Views

Author

Vladimir Shevelev, Oct 27 2008

Keywords

Comments

Positive integers such that for every integer m==8 (mod 9) there exists a unique representation of m as a sum of the form a(l)+3a(s).

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Module[{d = Reverse[IntegerDigits[n, 3]], k = 3, ans = True}, While[k <= Length[d], If[d[[k]] > 0, ans = False]; k += 2]; ans && d[[1]] == 1]; aQ[n_] := Mod[n + 1, 3] == 0 && fQ[(n + 1)/3]; Select[Range[10000], aQ] (* Amiram Eldar, Dec 09 2018 *)
  • PARI
    isa(n) = {my(d=Vecrev(digits(n, 3)), k=3); while (k <= #d, if (d[k], return (0)); k += 2;); d[1] == 1;} \\ A146085
    isok(n) = !((n+1) % 3) && isa((n+1)/3); \\ Michel Marcus, Dec 09 2018

Extensions

More terms from Michel Marcus, Dec 09 2018

A152259 Union of values: A147568(n) and 2*A147568(n) - 1.

Original entry on oeis.org

3, 5, 9, 11, 13, 21, 25, 35, 37, 43, 45, 69, 73, 85, 89, 131, 133, 139, 141, 163, 165, 171, 173, 261, 265, 277, 281, 325, 329, 341, 345, 515, 517, 523, 525, 547, 549, 555, 557, 643, 645, 651, 653, 675, 677, 683, 685, 1029, 1033, 1045, 1049, 1093, 1097, 1109, 1113, 1285, 1289
Offset: 1

Views

Author

Vladimir Shevelev, Dec 01 2008

Keywords

Comments

Every even N>=6 is a sum of two terms of the sequence.

Crossrefs

Programs

  • Mathematica
    A000695[n_]:= FromDigits[IntegerDigits[n,2], 4];
    Table[(3+(-1)^n)*A000695[Floor[(2*n-2-(-1)^n)/4]] +4+(-1)^n , {n, 202}]//DeleteDuplicates//Sort (* G. C. Greubel, May 22 2023 *)
  • PARI
    a147568(n) = 2*fromdigits(binary(n), 4) + 3;
    lista(nn) = {my(v = vector(2*nn+2), ind = 0); for (n=0, nn, my(x = a147568(n)); v[ind++] = x; v[ind++] = 2*x - 1); vecsort(v,,8);} \\ Michel Marcus, Dec 18 2018

Extensions

More terms from Michel Marcus, Dec 18 2018
Missing term 685 added by G. C. Greubel, May 22 2023
Showing 1-10 of 16 results. Next