A055247
Related to A055246 and A005836. Used for boundaries of open intervals which have to be erased in the Cantor middle third set construction.
Original entry on oeis.org
1, 2, 7, 8, 19, 20, 25, 26, 55, 56, 61, 62, 73, 74, 79, 80, 163, 164, 169, 170, 181, 182, 187, 188, 217, 218, 223, 224, 235, 236, 241, 242, 487, 488, 493, 494, 505, 506, 511, 512, 541, 542, 547, 548, 559, 560, 565, 566, 649, 650, 655, 656
Offset: 1
k=1: (1/3, 2/3); k=2: (1/9, 2/9), (7/9, 8/9); k=3: (1/27, 2/27), (7/27, 8/27), (19/27, 20/27), (25/27, 26/27); ...
A005836
Numbers whose base-3 representation contains no 2.
Original entry on oeis.org
0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 243, 244, 246, 247, 252, 253, 255, 256, 270, 271, 273, 274, 279, 280, 282, 283, 324, 325, 327, 328, 333, 334, 336, 337, 351, 352
Offset: 1
12 is a term because 12 = 110_3.
This sequence regarded as a triangle with rows of lengths 1, 1, 2, 4, 8, 16, ...:
0
1
3, 4
9, 10, 12, 13
27, 28, 30, 31, 36, 37, 39, 40
81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121
... - _Philippe Deléham_, Jun 06 2015
- Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section E10, pp. 317-323.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- David W. Wilson, Table of n, a(n) for n = 1..10000 (first 1024 terms from T. D. Noe)
- J.-P. Allouche, G.-N. Han, and Jeffrey Shallit, On some conjectures of P. Barry, arXiv:2006.08909 [math.NT], 2020.
- J.-P. Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
- J.-P. Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
- J.-P. Allouche, Jeffrey Shallit and G. Skordev, Self-generating sets, integers with missing blocks and substitutions, Discrete Math. 292 (2005) 1-15.
- David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
- Megumi Asada, Bruce Fang, Eva Fourakis, Sarah Manski, Nathan McNew, Steven J. Miller, Gwyneth Moreland, Ajmain Yamin, and Sindy Xin Zhang, Avoiding 3-Term Geometric Progressions in Hurwitz Quaternions, Williams College (2023).
- Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
- Noam Benson-Tilsen, Samuel Brock, Brandon Faunce, Monish Kumar, Noah Dokko Stein, and Joshua Zelinsky, Total Difference Labeling of Regular Infinite Graphs, arXiv:2107.11706 [math.CO], 2021.
- Raghavendra Bhat, Cristian Cobeli, and Alexandru Zaharescu, Filtered rays over iterated absolute differences on layers of integers, arXiv:2309.03922 [math.NT], 2023. See page 16.
- Matvey Borodin, Hannah Han, Kaylee Ji, Tanya Khovanova, Alexander Peng, David Sun, Isabel Tu, Jason Yang, William Yang, Kevin Zhang, and Kevin Zhao, Variants of Base 3 over 2, arXiv:1901.09818 [math.NT], 2019.
- Ben Chen, Richard Chen, Joshua Guo, Tanya Khovanova, Shane Lee, Neil Malur, Nastia Polina, Poonam Sahoo, Anuj Sakarda, Nathan Sheffield, and Armaan Tipirneni, On Base 3/2 and its Sequences, arXiv:1808.04304 [math.NT], 2018.
- Karl Dilcher and Larry Ericksen, Hyperbinary expansions and Stern polynomials, Elec. J. Combin, Vol. 22 (2015), Article P2.24.
- P. Erdős, V. Lev, G. Rauzy, C. Sandor, and A. Sarkozy, Greedy algorithm, arithmetic progressions, subset sums and divisibility, Discrete Math., Vol. 200, No. 1-3 (1999), pp. 119-135 (see Table 1). alternate link.
- Joseph L. Gerver and L. Thomas Ramsey, Sets of integers with no long arithmetic progressions generated by the greedy algorithm, Math. Comp., Vol. 33, No. 148 (1979), pp. 1353-1359.
- Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 45.
- Ryota Inagaki, Tanya Khovanova, and Austin Luo, Permutation-based Strategies for Labeled Chip-Firing on k-ary Trees, arXiv:2503.09577 [math.CO], 2025. See p. 18.
- Kathrin Kostorz, Robert W. Hölzel and Katharina Krischer, Distributed coupling complexity in a weakly coupled oscillatory network with associative properties, New J. Phys., Vol. 15 (2013), #083010; doi:10.1088/1367-2630/15/8/083010.
- Clark Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., Vol. 274, Vol. 1-3 (2004), pp. 147-160.
- John W. Layman, Some Properties of a Certain Nonaveraging Sequence, J. Integer Sequences, Vol. 2 (1999), Article 99.1.3.
- Manfred Madritsch and Stephan Wagner, A central limit theorem for integer partitions, Monatsh. Math., Vol. 161, No. 1 (2010), pp. 85-114.
- Richard A. Moy and David Rolnick, Novel structures in Stanley sequences, Discrete Math., Vol. 339, No. 2 (2016), pp. 689-698; arXiv preprint, arXiv:1502.06013 [math.CO], 2015.
- A. M. Odlyzko and R. P. Stanley, Some curious sequences constructed with the greedy algorithm, 1978, remark 1 (PDF, PS, TeX).
- Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228. [?Broken link]
- Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228.
- David Rolnick and Praveen S. Venkataramana, On the growth of Stanley sequences, Discrete Math., Vol. 338, No. 11 (2015), pp. 1928-1937, see p. 1930; arXiv preprint, arXiv:1408.4710 [math.CO], 2014.
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS.
- Ralf Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
- Ralf Stephan, Some divide-and-conquer sequences with (relatively) simple ordinary generating functions, 2004.
- Ralf Stephan, Table of generating functions.
- Zoran Sunic, Tree morphisms, transducers and integer sequences, arXiv:math/0612080 [math.CO], 2006.
- B. Vasic, K. Pedagani and M. Ivkovic, High-rate girth-eight low-density parity-check codes on rectangular integer lattices, IEEE Transactions on Communications, Vol. 52, Issue 8 (2004), pp. 1248-1252.
- Eric Weisstein's World of Mathematics, Central Binomial Coefficient.
- Index entries for 3-automatic sequences.
Cf.
A039966 (characteristic function).
Cf.
A002426,
A004793,
A005823,
A007088,
A007089,
A032924,
A033042-
A033052,
A054591,
A055246,
A062548,
A065361,
A074940,
A081601,
A081603,
A081611,
A083096,
A089118,
A121153,
A170943,
A185256.
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.
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
-
a005836 n = a005836_list !! (n-1)
a005836_list = filter ((== 1) . a039966) [0..]
-- Reinhard Zumkeller, Jun 09 2012, Sep 29 2011
-
function a(n)
m, r, b = n, 0, 1
while m > 0
m, q = divrem(m, 2)
r += b * q
b *= 3
end
r end; [a(n) for n in 0:57] |> println # Peter Luschny, Jan 03 2021
-
t := (j, n) -> add(binomial(n,k)^j, k=0..n):
for i from 1 to 400 do
if(t(4,i) mod 3 <>0) then print(i) fi
od; # Gary Detlefs, Nov 28 2011
# alternative Maple program:
a:= proc(n) option remember: local k, m:
if n=1 then 0 elif n=2 then 1 elif n>2 then k:=floor(log[2](n-1)): m:=n-2^k: procname(m)+3^k: fi: end proc:
seq(a(n), n=1.. 20); # Paul Weisenhorn, Mar 22 2020
# third Maple program:
a:= n-> `if`(n=1, 0, irem(n-1, 2, 'q')+3*a(q+1)):
seq(a(n), n=1..100); # Alois P. Heinz, Jan 26 2022
-
Table[FromDigits[IntegerDigits[k, 2], 3], {k, 60}]
Select[Range[0, 400], DigitCount[#, 3, 2] == 0 &] (* Harvey P. Dale, Jan 04 2012 *)
Join[{0}, Accumulate[Table[(3^IntegerExponent[n, 2] + 1)/2, {n, 57}]]] (* IWABUCHI Yu(u)ki, Aug 01 2012 *)
FromDigits[#,3]&/@Tuples[{0,1},7] (* Harvey P. Dale, May 10 2019 *)
-
A=vector(100);for(n=2,#A,A[n]=if(n%2,3*A[n\2+1],A[n-1]+1));A \\ Charles R Greathouse IV, Jul 24 2012
-
is(n)=while(n,if(n%3>1,return(0));n\=3);1 \\ Charles R Greathouse IV, Mar 07 2013
-
a(n) = fromdigits(binary(n-1),3); \\ Gheorghe Coserea, Jun 15 2018
-
def A005836(n):
return int(format(n-1,'b'),3) # Chai Wah Wu, Jan 04 2015
Edited by the Associate Editors of the OEIS, Apr 07 2009
A003278
Szekeres's sequence: a(n)-1 in ternary = n-1 in binary; also: a(1) = 1, a(2) = 2, and thereafter a(n) is smallest number k which avoids any 3-term arithmetic progression in a(1), a(2), ..., a(n-1), k.
Original entry on oeis.org
1, 2, 4, 5, 10, 11, 13, 14, 28, 29, 31, 32, 37, 38, 40, 41, 82, 83, 85, 86, 91, 92, 94, 95, 109, 110, 112, 113, 118, 119, 121, 122, 244, 245, 247, 248, 253, 254, 256, 257, 271, 272, 274, 275, 280, 281, 283, 284, 325, 326, 328, 329, 334, 335, 337, 338, 352, 353
Offset: 1
G.f. = x + 2*x^2 + 4*x^3 + 5*x^4 + 10*x^5 + 11*x^6 + 13*x^7 + 14*x^8 + 28*x^9 + ...
- Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 164.
- Richard K. Guy, Unsolved Problems in Number Theory, E10.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- David W. Wilson, Table of n, a(n) for n = 1..10000 [a(1..1024) from T. D. Noe]
- Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
- Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
- Paul Erdős and Paul Turan, On some sequences of integers, J. London Math. Soc., 11 (1936), 261-264.
- Joseph Gerver, James Propp and Jamie Simpson, Greedily partitioning the natural numbers into sets free of arithmetic progressions Proc. Amer. Math. Soc. 102 (1988), no. 3, 765-772.
- Fanel Iacobescu, Smarandache Partition Type and Other Sequences, Bull. Pure Appl. Sci. 16E, 237-240, 1997.
- Henry Ibstedt, A Few Smarandache Sequences, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 170-183.
- Gabor Korvin, Short note: Every large set of integers contains a three term arithmetic progression arXiv 1404.1557 [math.NT], Apr 6 2014.
- Leo Moser, An Introduction to the Theory of Numbers, The Trillia Group, 2011 (written in 1957). See pp. 61-62.
- James Propp and N. J. A. Sloane, Email, March 1994
- Florentin Smarandache, Sequences of Numbers Involved in Unsolved Problems.
- R. P. Stanley, Letter to N. J. A. Sloane, c. 1991
- Eric Weisstein's World of Mathematics, Smarandache Sequences.
- Index entries for sequences related to binary expansion of n
- Index entries related to non-averaging sequences
- Index entries related to Stanley sequences
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
Similar formula:
If A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+4^n) produces
A098871;
If A_n=(a(1),a(2),...,a(2^n)), then A_(n+1)=(A_n,A_n+2*3^n) produces
A191106.
-
function a(n)
return 1 + parse(Int, bitstring(n-1), base=3)
end # Gabriel F. Lipnik, Apr 16 2021
-
a:= proc(n) local m, r, b; m, r, b:= n-1, 1, 1;
while m>0 do r:= r+b*irem(m, 2, 'm'); b:= b*3 od; r
end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 17 2013
-
Take[ Sort[ Plus @@@ Subsets[ Table[3^n, {n, 0, 6}]]] + 1, 58] (* Robert G. Wilson v, Oct 23 2004 *)
a[1] = 0; h = 180;
Table[a[3 k - 2] = a[k], {k, 1, h}];
Table[a[3 k - 1] = a[k], {k, 1, h}];
Table[a[3 k] = 1, {k, 1, h}];
Table[a[n], {n, 1, h}] (* A189820 *)
Flatten[Position[%, 0]] (* A003278 *)
Flatten[Position[%%, 1]] (* A189822 *)
(* A003278 from A189820, from Clark Kimberling, May 26 2011 *)
Table[FromDigits[IntegerDigits[n, 2], 3] + 1, {n, 0, 57}] (* Amit Munje, Jun 03 2018 *)
-
a(n)=1+sum(i=1,n-1,(1+3^valuation(i,2))/2) \\ Ralf Stephan, Jan 21 2014
-
$nxt = 1; @list = (); for ($cnt = 0; $cnt < 1500; $cnt++) { while (exists $legal{$nxt}) { $nxt++; } print "$nxt "; last if ($nxt >= 1000000); for ($i = 0; $i <= $#list; $i++) { $t = 2*$nxt - $list[$i]; $legal{$t} = -1; } $cnt++; push @list, $nxt; $nxt++; } # Hal Burch
-
def A003278(n):
return int(format(n-1,'b'),3)+1 # Chai Wah Wu, Jan 04 2015
A191107
Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x+1 are in a.
Original entry on oeis.org
1, 4, 10, 13, 28, 31, 37, 40, 82, 85, 91, 94, 109, 112, 118, 121, 244, 247, 253, 256, 271, 274, 280, 283, 325, 328, 334, 337, 352, 355, 361, 364, 730, 733, 739, 742, 757, 760, 766, 769, 811, 814, 820, 823, 838, 841, 847, 850, 973, 976, 982, 985, 1000, 1003, 1009, 1012, 1054, 1057, 1063, 1066, 1081, 1084, 1090, 1093, 2188
Offset: 1
-
N:= 100000: # to get all terms <= N
with(queue):
Q:= new(1):
A:= {}:
while not empty(Q) do
s:= dequeue(Q);
A:= A union {s};
for t in {3*s-2,3*s+1} minus A do
if t <= N then enqueue(Q,t) fi
od
od:
sort(convert(A,list)); # Robert Israel, Nov 29 2015
-
h = 3; i = -2; j = 3; k = 1; f = 1; g = 7;
a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]] (* A191107 *)
b = (a + 2)/3; c = (a - 1)/3; r = Range[1, 900];
d = Intersection[b, r] (* A003278 *)
e = Intersection[c, r] (* A005836 *)
A074939
Even numbers such that base 3 representation contains no 2.
Original entry on oeis.org
0, 4, 10, 12, 28, 30, 36, 40, 82, 84, 90, 94, 108, 112, 118, 120, 244, 246, 252, 256, 270, 274, 280, 282, 324, 328, 334, 336, 352, 354, 360, 364, 730, 732, 738, 742, 756, 760, 766, 768, 810, 814, 820, 822, 838, 840, 846, 850, 972, 976, 982, 984, 1000, 1002
Offset: 0
-
Select[2*Range[0,600],DigitCount[#,3,2]==0&] (* Harvey P. Dale, Dec 10 2016 *)
-
def A074939(n): return int(bin((n.bit_count()&1)+(n<<1))[2:],3) # Chai Wah Wu, Jun 26 2025
A307744
A fractal function, related to ruler functions and the Cantor set. a(1) = 0; for m >= 0, a(3m) = 1; for m >= 1, a(3m-1) = a(m-1) + sign(a(m-1)), a(3m+1) = a(m+1) + sign(a(m+1)).
Original entry on oeis.org
1, 0, 2, 1, 3, 0, 1, 2, 3, 1, 4, 2, 1, 0, 4, 1, 2, 0, 1, 3, 2, 1, 4, 3, 1, 2, 4, 1, 5, 2, 1, 3, 5, 1, 2, 3, 1, 0, 2, 1, 5, 0, 1, 2, 5, 1, 3, 2, 1, 0, 3, 1, 2, 0, 1, 4, 2, 1, 3, 4, 1, 2, 3, 1, 5, 2, 1, 4, 5, 1, 2, 4, 1, 3, 2, 1, 5, 3, 1, 2, 5, 1, 6, 2, 1
Offset: 0
As 4 is congruent to 1 modulo 3, a(4) = a(3*1 + 1) = a(1+1) + sign (a(1+1)) = a(2) + sign(a(2)).
As 2 is congruent to -1 modulo 3, a(2) = a(3*1 - 1) = a(1-1) + sign (a(1-1)) = a(0) + sign(a(0)).
As 0 is congruent to 0 modulo 3, a(0) = 1. So a(2) = a(0) + sign(a(0)) = 1 + 1 = 2. So a(4) = a(2) + sign(a(2)) = 2 + 1 = 3.
For any m, the sequence from 9m - 9 to 9m + 9 can be represented by the table below. x, y and z represent distinct integers unless m = 0, in which case x = z = 0. Distinct values are shown in their own column to highlight patterns.
n a(n)
9m-9 1
9m-8 y - starts pattern (9m-8, 9m-4, 9m+4, 9m+8)
9m-7 2
9m-6 1
9m-5 x
9m-4 y
9m-3 1
9m-2 2
9m-1 x - ends pattern (9m-17, 9m-13, 9m-5, 9m-1)
9m 1
9m+1 z - starts pattern (9m+1, 9m+5, 9m+13, 9m+17)
9m+2 2
9m+3 1
9m+4 y
9m+5 z
9m+6 1
9m+7 2
9m+8 y - ends pattern (9m-8, 9m-4, 9m+4, 9m+8)
9m+9 1
For all m, one of x, y, z represents 3 in this table. Note the identical patterns indicated for "x", "y", "z" quadruples, and how the "x" quadruple ends 2 before the "z" quadruple starts, with the "y" quadruple overlapping both. For k >= 1, there are equivalent 2^k-tuples that overlap similarly, notably (3m-2, 3m+2) for all m.
Larger 2^k-tuples look more fractal, more obviously related to the Cantor set. See the pin plot of a(0..162) aligned above an inverted plot of ruler function A051064 in the links. 0's are emphasized with a fainter line running off the top of the plot, partly because 0 is used here as a conventional value and occurs with some properties (such as zero asymptotic density) that could be considered appropriate to the largest rather than smallest value in the sequence.
The table below illustrates the symmetries of scale of this sequence and ruler function A051064. Note the column for this sequence is indexed by k+1, 3k+1, 9k+1, whereas that for A051064 is indexed by k, 3k, 9k.
a(n+1) A051064(n)
n=k, k=16..27 0,1,3,2,1,4,3,1,2,4,1,5 1,1,3,1,1,2,1,1,2,1,1,4
n=3k,k=16..27 0,2,4,3,2,5,4,2,3,5,2,6 2,2,4,2,2,3,2,2,3,2,2,5
n=9k,k=16..27 0,3,5,4,3,6,5,3,4,6,3,7 3,3,5,3,3,4,3,3,4,3,3,6
-
a(n) = if (n==1, 0, my(m=n%3); if (m==0, 1, my(kk = (if (m==1, a(n\3+1), a((n-2)\3)))); kk + sign(kk)));
for (n=0, 100, print1(a(n), ", ")) \\ Michel Marcus, Jul 06 2019
A062548
Even integers that are not partial sums of A062547.
Original entry on oeis.org
2, 14, 38, 50, 110, 122, 146, 158, 326, 338, 362, 374, 434, 446, 470, 482, 974, 986, 1010, 1022, 1082, 1094, 1118, 1130, 1298, 1310, 1334, 1346, 1406, 1418, 1442, 1454, 2918, 2930, 2954, 2966, 3026, 3038, 3062, 3074, 3242, 3254, 3278, 3290, 3350, 3362
Offset: 0
-
2+12*Table[FromDigits[IntegerDigits[k, 2], 3], {k, 0, 64}]
A112035
a(n) = Sum_{k=0..n} k*C(n,k)^2*C(n+k,k)^3, where C := binomial.
Original entry on oeis.org
0, 8, 540, 42576, 3675000, 334595040, 31539372732, 3046472028320, 299666635774704, 29894793786770040, 3016010007220052700, 307083034957464057600, 31506217163866419507000, 3253427167078021753747200, 337821983730064508845772700, 35246436592815103238009282880
Offset: 0
-
Table[Sum[k*Binomial[n, k]^2*Binomial[n + k, k]^3, {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Jul 10 2021 *)
-
a(n) = sum(k=0, n, k*binomial(n,k)^2*binomial(n+k,k)^3); \\ Michel Marcus, Mar 10 2016
A190640
Numbers whose base-3 expansion ends in 2 and does not contain any 1's.
Original entry on oeis.org
2, 8, 20, 26, 56, 62, 74, 80, 164, 170, 182, 188, 218, 224, 236, 242, 488, 494, 506, 512, 542, 548, 560, 566, 650, 656, 668, 674, 704, 710, 722, 728, 1460, 1466, 1478, 1484, 1514, 1520, 1532, 1538, 1622, 1628, 1640, 1646, 1676, 1682, 1694, 1700, 1946, 1952, 1964, 1970, 2000, 2006, 2018, 2024, 2108, 2114, 2126
Offset: 1
-
Select[Range[2200],Last[IntegerDigits[#,3]]==2&&DigitCount[#,3,1]==0&] (* Harvey P. Dale, Sep 09 2012 *)
FromDigits[#,3]&/@(Join[#,{2}]&/@Tuples[{0,2},7]) (* Harvey P. Dale, Jul 25 2020 *)
-
is(n)=n%3==2 && setsearch(Set(digits(n,3)), 1)==0 \\ Charles R Greathouse IV, Aug 24 2016
-
a(n)=2*fromdigits(binary(2*n-1),3) \\ Charles R Greathouse IV, Aug 24 2016
A265159
Rectangular array A read by upward antidiagonals in which the entry in row n and column k is defined by A(n,k) = 5 + 9*A005836(2^(k - 1)*(2 n - 1)), n,k >= 1.
Original entry on oeis.org
5, 32, 14, 86, 95, 41, 113, 257, 284, 122, 248, 338, 770, 851, 365, 275, 743, 1013, 2309, 2552, 1094, 329, 824, 2228, 3038, 6926, 7655, 3281, 356, 986, 2471, 6683, 9113, 20777, 22964, 9842, 734, 1067, 2957, 7412, 20048, 27338, 62330, 68891, 29525
Offset: 1
Array A begins:
. 5 14 41 122 365 1094 3281 9842 29525
. 32 95 284 851 2552 7655 22964 68891 206672
. 86 257 770 2309 6926 20777 62330 186989 560966
. 113 338 1013 3038 9113 27338 82013 246038 738113
. 248 743 2228 6683 20048 60143 180428 541283 1623848
. 275 824 2471 7412 22235 66704 200111 600332 1800995
. 329 986 2957 8870 26609 79826 239477 718430 2155289
. 356 1067 3200 9599 28796 86387 259160 777479 2332436
. 734 2201 6602 19805 59414 178241 534722 1604165 4812494
-
(* Array: *)
a005836[1] := 0; a005836[n_] := If[OddQ[n], 3*a005836[Floor[(n + 1)/2]], a005836[n - 1] + 1]; a265159[n_, k_] := 5 + 9*a005836[2^(k - 1)*(2 n - 1)]; Grid[Table[a265159[n, k], {n, 9}, {k, 9}]]
(* Array antidiagonals flattened: *)
a005836[1] := 0; a005836[n_] := If[OddQ[n], 3*a005836[Floor[(n + 1)/2]], a005836[n - 1] + 1]; a265159[n_, k_] := 5 + 9*a005836[2^(k - 1)*(2 n - 1)]; Flatten[Table[a265159[n - k + 1, k], {n, 9}, {k, n}]]
Showing 1-10 of 10 results.
Comments