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-8 of 8 results.

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

Views

Author

Omar E. Pol, Nov 21 2007

Keywords

Comments

Numbers with middle digit 0, that have only one digit 0, and the total number of digits is odd; the digit 0 represents the eye of a cyclops.

Examples

			109 is a cyclops number because 109 has only one digit 0 and this 0 is the middle digit.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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
    
  • Python
    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
  • Sage
    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

Views

Author

Omar E. Pol, May 20 2009

Keywords

Comments

On the infinite square grid, we consider cells to be the squares, and we start at round 0 with all cells in the OFF state, so a(0) = 0.
At round 1, we turn ON four cells, forming a square.
The rule for n > 1: A cell in turned ON iff exactly one of its four vertices is a corner vertex of the set of ON cells. So in each generation every exposed vertex turns on three new cells.
Therefore:
At Round 2, we turn ON twelve cells around the square.
At round 3, we turn ON twelve other cells. Three cells around of every corner of the square.
And so on.
For the first differences see the entry A161411.
Shows a fractal behavior similar to the toothpick sequence A139250.
A very similar sequence is A160414, which uses the same rule but with a(1) = 1, not 4.
When n=2^k then the polygon formed by ON cells is a square with side length 2^(k+1).
a(n) is also the area of the figure of A147562 after n generations if A147562 is drawn as overlapping squares. - Omar E. Pol, Nov 08 2009
From Omar E. Pol, Mar 28 2011: (Start)
Also, toothpick sequence starting with four toothpicks centered at (0,0) as a cross.
Rule: Each exposed endpoint of the toothpicks of the old generation must be touched by the endpoints of three toothpicks of new generation. (Note that these three toothpicks looks like a T-toothpick, see A160172.)
The sequence gives the number of toothpicks after n stages. A161411 gives the number of toothpicks added at the n-th stage.
(End)

Examples

			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)
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    A160410(n)=sum(i=0,n-1,3^norml2(binary(i)))<<2 \\ M. F. Hasler, Dec 04 2012

Formula

Equals 4*A130665. This provides an explicit formula for a(n). - N. J. A. Sloane, Jul 13 2009
a(2^k) = (2*(2^k))^2 for k>=0.

Extensions

Edited by David Applegate and N. J. A. Sloane, Jul 13 2009

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

Views

Author

Omar E. Pol, Jun 08 2009

Keywords

Examples

			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
		

Crossrefs

Programs

  • Mathematica
    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

Views

Author

Omar E. Pol, Jun 08 2009

Keywords

Crossrefs

Extensions

Edited by Omar E. Pol, Jul 04 2009

A182809 Cyclops-Fibonacci numbers.

Original entry on oeis.org

0, 75025, 6557470319842, 14472334024676221, 99194853094755497
Offset: 1

Views

Author

Omar E. Pol, Dec 16 2010

Keywords

Comments

Note that a(5) = 99194853094755497 is the only known Cyclops-Fibonacci prime.
Next term, if it exists, is > Fibonacci(2359000). - Lars Blomberg, May 10 2011
This sequence is similar to A182811 in the sense that both have four positive terms and the only known prime is also the largest known term. - Omar E. Pol, Feb 18 2018
Indices in A000045 are 0, 25, 63, 79, 83. - Michel Marcus and Omar E. Pol, Feb 18 2018

Examples

			a(2) = 75025 is in the sequence because 75025 is a Fibonacci number A000045 and 75025 is also a cyclops number A134808.
		

Crossrefs

Intersection of A000045 and A134808.

Programs

  • Mathematica
    (* First run the program given for A134808 *) Select[Fibonacci[Range[10^3]], cyclopsQ] (* Alonso del Arte, Dec 16 2010 *)

Extensions

a(4) inserted by Alois P. Heinz, Dec 16 2010

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

Views

Author

Omar E. Pol, Jun 12 2009

Keywords

Comments

Cyclops numbers (A134808) that are also semiprimes (A001358).

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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

Views

Author

Omar E. Pol, Dec 21 2010

Keywords

Examples

			a(1) = 101 is in the sequence because 101 is a partition number A000041 and it is also a cyclops number A134808.
		

Crossrefs

Programs

  • Mathematica
    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 *)

Formula

Intersection of A000041 and A134808.

Extensions

a(11) from Alois P. Heinz, Dec 23 2010

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

Views

Author

K. D. Bajpai, Apr 25 2017

Keywords

Comments

The n-th octagonal number x(n) = n*(3*n - 2).
Subset of A000567.
All the terms have the number of digits odd with only one "zero" digit in the middle.

Examples

			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.
		

Crossrefs

Intersection of A000567 and A134808.

Programs

  • Maple
    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)]);
  • Mathematica
    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.