A327539
Starting from n: as long as the decimal representation starts with a positive even number, divide the largest such prefix by 2; a(n) corresponds to the final value.
Original entry on oeis.org
0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 11, 11, 13, 3, 15, 13, 17, 7, 19, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 11, 11, 13, 11, 15, 13, 17, 3, 19, 15, 51, 13, 53, 17, 55, 7, 57, 19, 59, 15, 31, 31, 33, 1, 35, 33, 37, 17, 39, 35, 71
Offset: 0
For n = 10000:
- 10000 gives 10000/2 = 5000,
- 5000 gives 5000/2 = 2500,
- 2500 gives 2500/2 = 1250,
- 1250 gives 125/2 = 625,
- 625 gives 62/2 followed by 5 = 315,
- 315 has only odd digits, so a(10000) = 315.
-
Array[FixedPoint[If[AllTrue[#, OddQ], FromDigits@ #, FromDigits@ Flatten@ Join[IntegerDigitsFromDigits[First[#]]/2, Last[#]] &@ TakeDrop[#, Position[#, ?EvenQ][[-1, -1]] ] ] &@ IntegerDigits[#] &, #] &, 71] (* _Michael De Vlieger, Dec 01 2019 *)
-
a(n) = if (n==0, 0, n%2==0, a(n/2), 10*a(n\10)+(n%10))
A029748
Numbers of the form 2^k times 1, 3 or 7.
Original entry on oeis.org
1, 2, 3, 4, 6, 7, 8, 12, 14, 16, 24, 28, 32, 48, 56, 64, 96, 112, 128, 192, 224, 256, 384, 448, 512, 768, 896, 1024, 1536, 1792, 2048, 3072, 3584, 4096, 6144, 7168, 8192, 12288, 14336, 16384, 24576, 28672, 32768, 49152, 57344, 65536, 98304, 114688, 131072
Offset: 0
-
CoefficientList[Series[-(x^5 + 2 x^4 + 2 x^3 + 3 x^2 + 2 x + 1)/(2 x^3 - 1), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 18 2013 *)
Sort[Flatten[#{1,3,7}&/@(2^Range[0,20])]] (* Harvey P. Dale, Jan 30 2014 *)
A047335
Numbers that are congruent to {0, 6} mod 7.
Original entry on oeis.org
0, 6, 7, 13, 14, 20, 21, 27, 28, 34, 35, 41, 42, 48, 49, 55, 56, 62, 63, 69, 70, 76, 77, 83, 84, 90, 91, 97, 98, 104, 105, 111, 112, 118, 119, 125, 126, 132, 133, 139, 140, 146, 147, 153, 154, 160, 161, 167, 168
Offset: 1
- Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585
-
Select[Range[0,200],MemberQ[{0,6},Mod[#,7]]&] (* Harvey P. Dale, Mar 16 2011 *)
A047382
Numbers that are congruent to {0, 5} mod 7.
Original entry on oeis.org
0, 5, 7, 12, 14, 19, 21, 26, 28, 33, 35, 40, 42, 47, 49, 54, 56, 61, 63, 68, 70, 75, 77, 82, 84, 89, 91, 96, 98, 103, 105, 110, 112, 117, 119, 124, 126, 131, 133, 138, 140, 145, 147, 152, 154, 159, 161, 166, 168
Offset: 1
-
&cat[[7*n,7*n+5]: n in [0..23]]; // Bruno Berselli, Oct 17 2011
-
{#, 5 + #} &/@ (7 Range[0, 30]) // Flatten (* or *) LinearRecurrence[{1, 1, -1}, {0, 5, 7}, 60] (* Harvey P. Dale, Dec 01 2016 *)
-
a(n) = (14*n + 3*(-1)^n - 11)/4 \\ David Lovler, Sep 11 2022
Original entry on oeis.org
1, 3, 7, 14, 28, 56, 112, 224, 448, 896, 1792, 3584, 7168, 14336, 28672, 57344, 114688, 229376, 458752, 917504, 1835008, 3670016, 7340032, 14680064, 29360128, 58720256, 117440512, 234881024, 469762048, 939524096, 1879048192, 3758096384, 7516192768, 15032385536
Offset: 1
First few rows of A125175 are:
1;
1, 2;
1, 3, 3;
1, 4, 5, 4;
....
a(4) = 1 + 4 + 5 + 4 = 14.
a(6) = 1 + 6 + 14 + 20 + 9 + 6 = 56 = 7*8 = 7*2^3.
-
Concatenation([1,3], List([3..40], n-> 7*2^(n-3))); # G. C. Greubel, Jun 05 2019
-
[1,3] cat [7*2^(n-3): n in [3..40]]; // G. C. Greubel, Jun 05 2019
-
Rest@CoefficientList[Series[x*(1+x+x^2)/(1-2*x), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 12 2013 *)
-
concat([1,3], vector(30, n, 7*2^(n-1))) \\ G. C. Greubel, Jun 05 2019
-
print([7*2**n//8 for n in range(1, 50)]) # Karl V. Keller, Jr., May 11 2022
-
[1,3]+[7*2^(n-3) for n in (3..40)] # G. C. Greubel, Jun 05 2019
A135092
Binomial transform of [1, 6, 1, 6, 1, 6, ...].
Original entry on oeis.org
1, 7, 14, 28, 56, 112, 224, 448, 896, 1792, 3584, 7168, 14336, 28672, 57344, 114688, 229376, 458752, 917504, 1835008, 3670016, 7340032, 14680064, 29360128, 58720256, 117440512, 234881024, 469762048, 939524096, 1879048192, 3758096384, 7516192768, 15032385536
Offset: 0
a(3) = (1, 3, 3, 1) dot (1, 6, 1, 6) = (1 + 18 + 3 + 6) = 28 = 7*2^2.
A340666
A(n,k) is derived from n by replacing each 0 in its binary representation with a string of k 0's; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 8, 3, 4, 3, 0, 1, 16, 3, 16, 5, 3, 0, 1, 32, 3, 64, 9, 6, 7, 0, 1, 64, 3, 256, 17, 12, 7, 1, 0, 1, 128, 3, 1024, 33, 24, 7, 8, 3, 0, 1, 256, 3, 4096, 65, 48, 7, 64, 9, 3, 0, 1, 512, 3, 16384, 129, 96, 7, 512, 33, 10, 7
Offset: 0
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 4, 8, 16, 32, 64, 128, 256, ...
3, 3, 3, 3, 3, 3, 3, 3, 3, ...
1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, ...
3, 5, 9, 17, 33, 65, 129, 257, 513, ...
3, 6, 12, 24, 48, 96, 192, 384, 768, ...
7, 7, 7, 7, 7, 7, 7, 7, 7, ...
1, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, ...
...
Rows n=0..17, 19 give:
A000004,
A000012,
A000079,
A010701,
A000302,
A000051(k+1),
A007283,
A010727,
A001018,
A087289,
A007582(k+1),
A062709(k+2),
A164346,
A181565(k+1),
A005009,
A181404(k+3),
A001025,
A199493,
A253208(k+1).
-
A:= (n, k)-> Bits[Join](subs(0=[0$k][], Bits[Split](n))):
seq(seq(A(n, d-n), n=0..d), d=0..12);
# second Maple program:
A:= proc(n, k) option remember; `if`(n<2, n,
`if`(irem(n, 2, 'r')=1, A(r, k)*2+1, A(r, k)*2^k))
end:
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
A[n_, k_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence @@ Table[0, {k}], 2];
Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 02 2021 *)
A191664
Dispersion of A014601 (numbers >2, congruent to 0 or 3 mod 4), by antidiagonals.
Original entry on oeis.org
1, 3, 2, 7, 4, 5, 15, 8, 11, 6, 31, 16, 23, 12, 9, 63, 32, 47, 24, 19, 10, 127, 64, 95, 48, 39, 20, 13, 255, 128, 191, 96, 79, 40, 27, 14, 511, 256, 383, 192, 159, 80, 55, 28, 17, 1023, 512, 767, 384, 319, 160, 111, 56, 35, 18, 2047, 1024, 1535, 768, 639
Offset: 1
Northwest corner:
1...3...7....15...31
2...4...8....16...32
5...11..23...47...95
6...12..24...48...96
9...19..39...79...159
-
(* Program generates the dispersion array T of the increasing sequence f[n] *)
r = 40; r1 = 12; c = 40; c1 = 12;
a = 3; b = 4; m[n_] := If[Mod[n, 2] == 0, 1, 0];
f[n_] := a*m[n + 1] + b*m[n] + 4*Floor[(n - 1)/2]
Table[f[n], {n, 1, 30}] (* A014601(n+2): (4+4k,5+4k) *)
mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
rows = {NestList[f, 1, c]};
Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
t[i_, j_] := rows[[i, j]];
TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191664 *)
Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191664 *)
(* Clark Kimberling, Jun 11 2011 *)
Grid[Table[2^k*(2*Floor[(n + 1)/2] - 1) - Mod[n, 2], {n, 12}, {k, 12}]] (* L. Edson Jeffery, Aug 13 2014 *)
A206372
a(n) = 14 * 4^n - 1.
Original entry on oeis.org
13, 55, 223, 895, 3583, 14335, 57343, 229375, 917503, 3670015, 14680063, 58720255, 234881023, 939524095, 3758096383, 15032385535, 60129542143, 240518168575, 962072674303, 3848290697215, 15393162788863, 61572651155455, 246290604621823, 985162418487295
Offset: 0
A212191
Numbers whose squares are the sum of exactly three distinct powers of 2.
Original entry on oeis.org
5, 7, 9, 10, 14, 17, 18, 20, 23, 28, 33, 34, 36, 40, 46, 56, 65, 66, 68, 72, 80, 92, 112, 129, 130, 132, 136, 144, 160, 184, 224, 257, 258, 260, 264, 272, 288, 320, 368, 448, 513, 514, 516, 520, 528, 544, 576, 640, 736, 896, 1025, 1026, 1028, 1032, 1040
Offset: 1
- Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 1000 terms from Reinhard Zumkeller)
- J. D. Currie, There are ternary circular square-free words of length n for n >= 18, Elect. J. Combinatorics 9 (2002), Note #N10.
- James D. Currie, and Jesse T. Johnson, There are level ternary circular square-free words of length n for n != 5,7,9,10,14,17, arXiv:2005.06235 [math.CO], 2020.
- Arseny M. Shur, On Ternary Square-free Circular Words, Electronic J. Combin., Volume 17 (2010), Research Paper #R140.
-
a212191 n = a212191_list !! (n-1)
a212191_list = map a000196 a212190_list
-
Select[Range[1, 1000], Total[IntegerDigits[#^2, 2]] == 3 &] (* T. D. Noe, Dec 07 2012 *)
Comments