A134808
Cyclops numbers.
Original entry on oeis.org
0, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 207, 208, 209, 301, 302, 303, 304, 305, 306, 307, 308, 309, 401, 402, 403, 404, 405, 406, 407, 408, 409, 501, 502, 503, 504, 505, 506, 507, 508, 509, 601, 602, 603, 604, 605, 606
Offset: 1
109 is a cyclops number because 109 has only one digit 0 and this 0 is the middle digit.
-
cyclopsQ[n_Integer, b_:10] := Module[{digitList = IntegerDigits[n, b], len, pos0s, flag}, len = Length[digitList]; pos0s = Select[Range[len], digitList[[#]] == 0 &]; flag = OddQ[len] && (Length[pos0s] == 1) && (pos0s == {(len + 1)/2}); Return[flag]]; Select[Range[0,999],cyclopsQ] (* Alonso del Arte, Dec 16 2010 *)
Reap[Do[id=IntegerDigits[n];If[Position[id,0]=={{(Length[id]+1)/2}},Sow[n]],{n,0,10^3}]][[2,1]] (* Zak Seidov, Dec 17 2010 *)
cycQ[n_]:=Module[{idn=IntegerDigits[n],len=IntegerLength[n]},OddQ[len] && DigitCount[ n,10,0]==1&&idn[[(len+1)/2]]==0]; Join[{0},Select[Range[ 0,700],cycQ]] (* Harvey P. Dale, Mar 07 2020 *)
-
a(n, {base=10}) = my (l=0); my (r=n-1); while (r >= (base-1)^(2*l), r -= (base-1)^(2*l); l++); return (base^(l+1) * ( (base^l-1)/(base-1) + if (base>2, fromdigits(digits(r \ ((base-1)^l), (base-1)), base)) ) + ( (base^l-1)/(base-1) + if (base>2, fromdigits(digits(r % ((base-1)^l), (base-1)), base)))) \\ Rémy Sigrist, Apr 29 2017
-
from itertools import product
def cyclops(upto=float('inf'), upton=float('inf')): # generator
yield 0
c, n, half_digits, pow10 = 0, 1, 0, 10
while 100**(half_digits+1) < upto and n < upton:
half_digits += 1
pow10 *= 10
for left in product("123456789", repeat=half_digits):
left_plus_eye = int("".join(left))*pow10
for right in product("123456789", repeat=half_digits):
c, n = left_plus_eye + int("".join(right)), n+1
if c <= upto and n <= upton: yield c
print([c for c in cyclops(upto=606)])
print([c for c in cyclops(upton=52)]) # Michael S. Branicky, Jan 05 2021
-
def is_cyclops(n, base=10):
dg = n.digits(base) if n > 0 else [0]
return len(dg) % 2 == 1 and dg[len(dg)//2] == 0 and dg.count(0) == 1
is_A134808 = lambda n: is_cyclops(n)
# D. S. McNeil, Dec 17 2010
A160410
Number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton (see Comments for precise definition).
Original entry on oeis.org
0, 4, 16, 28, 64, 76, 112, 148, 256, 268, 304, 340, 448, 484, 592, 700, 1024, 1036, 1072, 1108, 1216, 1252, 1360, 1468, 1792, 1828, 1936, 2044, 2368, 2476, 2800, 3124, 4096, 4108, 4144, 4180, 4288, 4324, 4432, 4540, 4864, 4900, 5008, 5116, 5440, 5548, 5872, 6196
Offset: 0
From _Omar E. Pol_, Sep 24 2015: (Start)
With the positive terms written as an irregular triangle in which the row lengths are the terms of A011782 the sequence begins:
4;
16;
28, 64;
76, 112, 148, 256;
268, 304, 340, 448, 484, 592, 700, 1024;
...
Right border gives the elements of A000302 greater than 1.
This triangle T(n,k) shares with the triangle A256534 the terms of the column k, if k is a power of 2, for example, both triangles share the following terms: 4, 16, 28, 64, 76, 112, 256, 268, 304, 448, 1024, etc.
.
Illustration of initial terms, for n = 1..10:
. _ _ _ _ _ _ _ _
. | _ _ | | _ _ |
. | | _|_|_ _ _ _ _ _ _ _ _ _ _ _|_|_ | |
. | |_| _ _ _ _ _ _ _ _ |_| |
. |_ _| | _|_ _|_ | | _|_ _|_ | |_ _|
. | |_| _ _ |_| |_| _ _ |_| |
. | | | _|_|_ _ _ _|_|_ | | |
. | _| |_| _ _ _ _ |_| |_ |
. | | |_ _| | _|_ _|_ | |_ _| | |
. | |_ _| | |_| _ _ |_| | |_ _| |
. | | | | | | | |
. | _ _ | _| |_ _| |_ | _ _ |
. | | _|_| | |_ _ _ _| | |_|_ | |
. | |_| _| |_ _| |_ _| |_ |_| |
. | | | |_ _ _ _ _ _ _ _| | | |
. | _| |_ _| |_ _| |_ _| |_ |
. _ _| | |_ _ _ _| | | |_ _ _ _| | |_ _
. | _| |_ _| |_ _| |_ _| |_ _| |_ |
. | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
. | |_ _| | | |_ _| |
. |_ _ _ _| |_ _ _ _|
.
After 10 generations there are 304 ON cells, so a(10) = 304.
(End)
- Michael De Vlieger, Table of n, a(n) for n = 0..1000
- 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.],
- 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. 31.
- Omar E. Pol, Illustration of initial terms (2009)
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
- Index entries for sequences related to cellular automata
Cf.
A000079,
A000302,
A048883,
A139250,
A147562,
A160118,
A160412,
A160414,
A161411,
A160717,
A160720,
A160727,
A256530,
A256534.
-
RasterGraphics[state_?MatrixQ,colors_Integer:2,opts___]:=
Graphics[Raster[Reverse[1-state/(colors -1)]],
AspectRatio ->(AspectRatio/.{opts}/.AspectRatio ->Automatic),
Frame ->True, FrameTicks ->None, GridLines ->None];
rule=1340761804646523638425234105559798690663900360577570370705802859623\
705267234688669629039040624964794287326910250673678735142700520276191850\
5902735959769690
Show[GraphicsArray[Map[RasterGraphics,CellularAutomaton[{rule, {2,
{{4,2,1}, {32,16,8}, {256,128,64}}}, {1,1}}, {{{1,1}, {1,1}}, 0}, 9,-10]]]];
ca=CellularAutomaton[{rule,{2,{{4,2,1},{32,16,8},{256,128,64}}},{1,
1}},{{{1,1},{1,1}},0},99,-100];
Table[Total[ca[[i]],2],{i,1,Length[ca]}]
(* John W. Layman, Sep 01 2009; Sep 02 2009 *)
a[n_] := 4*Sum[3^DigitCount[k, 2, 1], {k, 0, n-1}];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Nov 17 2017, after N. J. A. Sloane *)
-
A160410(n)=sum(i=0,n-1,3^norml2(binary(i)))<<2 \\ M. F. Hasler, Dec 04 2012
A160711
Cyclops squares: squares (A000290) that are also cyclops numbers (A134808).
Original entry on oeis.org
0, 11025, 19044, 21025, 24025, 32041, 38025, 42025, 47089, 51076, 58081, 59049, 65025, 66049, 67081, 75076, 87025, 93025, 1110916, 1140624, 1170724, 1190281, 1240996, 1270129, 1290496, 1340964, 1350244, 1380625, 1420864, 1430416
Offset: 1
19044 is in the sequence because it is a square (138^2) and is also a cyclops number (odd number of digits, middle digit is the only zero).
11025 is in the sequence because it is a square (105^2) and is also a cyclops number (odd number of digits, middle digit is the only zero). - _Michael B. Porter_, Jul 09 2016
-
Select[Range[0, 1200]^2, And[OddQ@ Length@ #, #[[Ceiling[Length[#]/2]]] == 0, Count[#, 0] == 1] &@ IntegerDigits@ # &] (* Michael De Vlieger, Jul 08 2016 *)
cnQ[n_]:=Module[{len=IntegerLength[n]},OddQ[len]&&DigitCount[n,10,0]==1 && IntegerDigits[n][[(len+1)/2]]==0]; Join[{0},Select[Range[1200]^2,cnQ]] (* Harvey P. Dale, Mar 19 2018 *)
A160712
Composite cyclops numbers (A134808).
Original entry on oeis.org
102, 104, 105, 106, 108, 201, 202, 203, 204, 205, 206, 207, 208, 209, 301, 302, 303, 304, 305, 306, 308, 309, 402, 403, 404, 405, 406, 407, 408, 501, 502, 504, 505, 506, 507, 508, 602, 603, 604, 605, 606, 608, 609, 702, 703, 704
Offset: 1
A182809
Cyclops-Fibonacci numbers.
Original entry on oeis.org
0, 75025, 6557470319842, 14472334024676221, 99194853094755497
Offset: 1
a(2) = 75025 is in the sequence because 75025 is a Fibonacci number A000045 and 75025 is also a cyclops number A134808.
A160725
Cyclops semiprimes.
Original entry on oeis.org
106, 201, 202, 203, 205, 206, 209, 301, 302, 303, 305, 309, 403, 407, 501, 502, 505, 703, 706, 707, 802, 803, 807, 901, 905, 11013, 11014, 11015, 11017, 11019, 11021, 11023, 11029, 11031, 11035, 11038, 11041, 11042, 11051, 11053
Offset: 1
-
g:= proc(x,n)
local L,i;
L:= convert(x+9^(2*n),base,9);
add((L[i]+1)*10^(i-1),i=1..n)+add((L[i]+1)*10^i,i=n+1..2*n)
end proc:
select(t -> numtheory:-bigomega(t)=2,[seq(seq(g(i,n),i=0..9^(2*n)-1),n=1..2)]); # Robert Israel, Jan 20 2019
-
Select[Range@ 12000, And[OddQ@ #2, #3[[Ceiling[#2/2] ]] == 0, Count[#3, 0] == 1, PrimeOmega@ #1 == 2] & @@ {#, IntegerLength@ #, IntegerDigits@ #} &] (* or *)
Select[Flatten@ Table[a (10^(d + 1)) + b, {d, 2}, {a, FromDigits /@ Tuples[Range@ 9, {d}]}, {b, FromDigits /@ Tuples[Range@ 9, {d}]}], PrimeOmega@ # == 2 &] (* Michael De Vlieger, Jan 20 2019 *)
A183056
Cyclops partition numbers.
Original entry on oeis.org
101, 26015, 483502844, 27517052599, 2814570987591, 269232701252579, 12269218019229465, 477535459708164115593, 55271949286085137715955, 98175979536033971312388, 28848173767368633057992125893483779
Offset: 1
a(1) = 101 is in the sequence because 101 is a partition number A000041 and it is also a cyclops number A134808.
-
cnQ[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];DigitCount[ n,10,0]==1&&OddQ[len]&&idn[[(len+1)/2]]==0]; Select[PartitionsP[ Range[ 2000]],cnQ] (* Harvey P. Dale, Apr 10 2019 *)
A285767
Cyclops octagonal numbers: a(n) = n*(3*n-2) with one "zero" digit in the middle.
Original entry on oeis.org
0, 408, 11041, 18096, 22016, 23056, 28033, 38081, 56033, 61061, 1140833, 1170625, 1250656, 1410416, 1460216, 1540833, 2120161, 2130261, 2140385, 2150533, 2310896, 2390561, 2460696, 2520833, 2570576, 2780181, 2920533, 3230256, 3280256, 3490565, 3660865, 3680776
Offset: 1
For n = 12; x(12) = 12*(3*12 - 2) = 408 that is 12th octagonal number with one zero digit in the middle, hence appears in the sequence.
For n = 61; x(61) = 61*(3*61 - 2) = 11041 that is 61st octagonal number with one zero digit in the middle, hence appears in the sequence.
-
iscyclops:= proc(n) local L,t;
t:= ilog10(n);
if t::odd then return false fi;
L:= convert(n,base,10);
L[1+t/2] = 0 and numboccur(0,L) = 1
end proc:
iscyclops(0):= true:
select(iscyclops, [seq(n*(3*n-2),n=0..1000)]);
-
Select[Table[n (3 n - 2), {n, 0, 1110}], And[OddQ@ Length@ #, Count[#, 0] == 1, Take[#, {Ceiling[Length[#]/2]}] == {0}] &@ IntegerDigits@ # &] (* Michael De Vlieger, Apr 26 2017 *)
Showing 1-8 of 8 results.
Comments