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.

Previous Showing 31-40 of 60 results. Next

A097254 Numbers whose set of base 8 digits is {0,7}.

Original entry on oeis.org

0, 7, 56, 63, 448, 455, 504, 511, 3584, 3591, 3640, 3647, 4032, 4039, 4088, 4095, 28672, 28679, 28728, 28735, 29120, 29127, 29176, 29183, 32256, 32263, 32312, 32319, 32704, 32711, 32760, 32767, 229376, 229383, 229432, 229439, 229824
Offset: 1

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 8 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..250000] | Set(IntegerToSequence(n, 8)) subset {0, 7}]; // Vincenzo Librandi, May 25 2012
    
  • Mathematica
    fQ[n_]:=Union@Join[{0,7},IntegerDigits[n,8]]=={0,7};Select[Range[0,300000],fQ] (* Vincenzo Librandi, May 25 2012 *)
    FromDigits[#,8]&/@Tuples[{0,7},6] (* Harvey P. Dale, Aug 10 2021 *)
  • Maxima
    a[1]:0$ a[n]:=8*a[floor((n+1)/2)]+7*(1+(-1)^n)/2$ makelist(a[n], n, 1, 37); /* Bruno Berselli, May 25 2012 */
    
  • PARI
    a(n) = 7*fromdigits(binary(n-1), 8) \\ Rémy Sigrist, Dec 06 2018

Formula

a(n) = 7*A033045(n-1).
a(2n-1) = 8*a(n), a(2n) = 8*a(n)+7.

A170943 Numbers n with the property that when 1/n is written in base 3 (in either of the two representations, if the representation is ambiguous) the fractional part contains no 1's.

Original entry on oeis.org

1, 4, 10, 12, 13, 28, 30, 36, 39, 40, 82, 84, 90, 91, 108, 117, 120, 121, 244, 246, 252, 270, 273, 324, 328, 351, 360, 363, 364, 730, 732, 738, 756, 757, 810, 819, 820, 949, 972, 984, 1036, 1053, 1080, 1089, 1092, 1093, 2188, 2190, 2196, 2214, 2268, 2271, 2362, 2430
Offset: 1

Views

Author

J. H. Conway, T. D. Noe and N. J. A. Sloane, Feb 20 2010

Keywords

Comments

That is, neither of the two representations of 1/n in base 3 contain a 1.
This is A121153 without the numbers 3^k, k >= 1. See that entry for further information.

Examples

			1/3 in base 3 can be written as either .1 or .0222222... The first version contains a 1, so 3 is not in the sequence.
1/4 in base 3 is .02020202020..., so 4 is in the sequence.
		

Crossrefs

A170951 Numbers n with the property that some of the fractions i/n (with gcd(i,n)=1, 0 < i/n < 1) are in the Cantor set and some are not.

Original entry on oeis.org

9, 12, 13, 27, 28, 30, 36, 39, 40, 81, 82, 84, 90, 91, 108, 117, 120, 121, 243, 244, 246, 252, 270, 273, 324, 328, 351, 360, 363, 364, 729, 730, 732, 738, 756, 757, 810, 819, 820, 949, 972, 984, 1036, 1053, 1080, 1089, 1092, 1093, 2187
Offset: 1

Views

Author

J. H. Conway and N. J. A. Sloane, Feb 20 2010

Keywords

Comments

Equals A054591 \ {1,3,4,10}.
The natural numbers may be divided into three sets: denominators which force membership in the Cantor set, denominators which deny membership in the Cantor set and denominators which neither force nor deny membership. The first set contains just the numbers 1, 3, 4, 10. The second set is A170944. The third set is the present sequence.

Examples

			1/9 is in the Cantor set, but 4/9 is not.
		

Crossrefs

A332497 a(n) = x(w+1) where x(0) = 0 and x(k+1) = 2^(k+1)-1-x(k) (resp. x(k)) when d_k = 1 (resp. d_k <> 1) and Sum_{k=0..w} d_k*3^k is the ternary representation of n. Sequence A332498 gives corresponding y's.

Original entry on oeis.org

0, 1, 0, 3, 2, 3, 0, 1, 0, 7, 6, 7, 4, 5, 4, 7, 6, 7, 0, 1, 0, 3, 2, 3, 0, 1, 0, 15, 14, 15, 12, 13, 12, 15, 14, 15, 8, 9, 8, 11, 10, 11, 8, 9, 8, 15, 14, 15, 12, 13, 12, 15, 14, 15, 0, 1, 0, 3, 2, 3, 0, 1, 0, 7, 6, 7, 4, 5, 4, 7, 6, 7, 0, 1, 0, 3, 2, 3, 0, 1
Offset: 0

Views

Author

Rémy Sigrist, Feb 14 2020

Keywords

Comments

The representation of {(a(n), A332498(n))} is related to the T-square fractal (see illustration in Links section).
We can iteratively build the set {(a(n), A332498(n))} as follows:
- start with X_0 = {(0, 0)},
- for k = 0, 1, ..., X_{k+1} is obtained by adjoining to X_k:
- an horizontally mirrored copy of X_k to the right,
- and a vertically mirrored copy of X_k on the top,
- this corresponds to the following substitution:
.---.
.---. | V |
| X | --> .---.---.
.---. | X | H |
.---.---.

Examples

			For n = 42:
- the ternary representation of 42 is "1120",
- x(0) = 0,
- x(1) = x(0) = 0 (as d_0 = 0 <> 1),
- x(2) = x(1) = 0 (as d_1 = 2 <> 1),
- x(3) = 2^3-1 - x(2) = 7 (as d_2 = 1),
- x(4) = 2^4-1 - x(3) = 8 (as d_3 = 1),
- hence a(42) = 8.
		

Crossrefs

See A332412 for a similar sequence.
Cf. A005823, A332498 (corresponding y's).

Programs

  • PARI
    a(n) = { my (x=0, k=1); while (n, if (n%3==1, x=2^k-1-x); n\=3; k++); x }

Formula

a(n) = 0 iff n belongs to A005823.

A351893 Numbers that contain only even digits in their factorial-base representation.

Original entry on oeis.org

0, 4, 12, 16, 48, 52, 60, 64, 96, 100, 108, 112, 240, 244, 252, 256, 288, 292, 300, 304, 336, 340, 348, 352, 480, 484, 492, 496, 528, 532, 540, 544, 576, 580, 588, 592, 1440, 1444, 1452, 1456, 1488, 1492, 1500, 1504, 1536, 1540, 1548, 1552, 1680, 1684, 1692, 1696
Offset: 1

Views

Author

Amiram Eldar, Feb 24 2022

Keywords

Comments

All the terms are multiples of 4 (A008586).

Examples

			4 is a term since its factorial-base presentation, 20, has only even digits.
16 is a term since its factorial-base presentation, 220, has only even digits.
		

Crossrefs

Subsequence: A052849 \ {2}.
Similar sequences: A005823 (ternary), A014263 (decimal), A062880 (quaternary).

Programs

  • Mathematica
    max = 7; fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; Select[Range[0, max!, 2], AllTrue[fctBaseDigits[#], EvenQ] &]

A371256 The run lengths transform of the ternary expansion of n corresponds to the run lengths transform of the binary expansion of a(n).

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 2, 2, 3, 4, 5, 5, 6, 7, 6, 5, 5, 4, 4, 5, 5, 5, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 10, 10, 10, 11, 12, 13, 13, 14, 15, 14, 13, 13, 12, 11, 10, 10, 10, 11, 10, 9, 9, 8, 8, 9, 9, 10, 11, 10, 10, 10, 11, 11, 10, 10, 9, 8, 9, 10, 10, 11, 12, 13, 13
Offset: 0

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Comments

For any v >= 0, the value v appears 2^A005811(v) times in the sequence.

Examples

			The first terms, alongside the ternary expansion of n and the binary expansion of a(n), are:
  n   a(n)  ter(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     1       2          1
   3     2      10         10
   4     3      11         11
   5     2      12         10
   6     2      20         10
   7     2      21         10
   8     3      22         11
   9     4     100        100
  10     5     101        101
  11     5     102        101
  12     6     110        110
  13     7     111        111
  14     6     112        110
  15     5     120        101
		

Crossrefs

See A371263 for a similar sequence.

Programs

  • PARI
    a(n) = { my (r = [], d, l, v = 0); while (n, d = n%3; l = 0; while ((n%3)==d, n\=3; l++;); r = concat(l, r);); for (k = 1, #r, v = (v+k%2)*2^r[k]-k%2); v }

Formula

a(A005823(n)) = n - 1.
a(A005836(n)) = n - 1.
a(A004488(n)) = a(n).
abs(a(n+1) - a(n)) <= 1.

A105220 Trajectory of 1 under the morphism 1->{1,2,1}, 2->{2,2,2}.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Roger L. Bagula, Apr 29 2005

Keywords

Comments

Dekking substitution for the Cantor set: characteristic polynomial = x^2 - 5*x + 6 of matrix [2, 0; 1, 3].
This substitution is useful for computing the devil's staircase by bb=aa/. 1->1/3/. 2->0 /. 3->0; ListPlot[FoldList[Plus, 0, bb], PlotRange -> All, PlotJoined -> True, Axes ->False];
The Wikipedia article on L-system Example 3 is "Cantor dust" given by the axiom: A and rules: A -> ABA, B -> BBB. This is isomorphic to the system given in the sequence name. - Michael Somos, Jan 12 2015

Crossrefs

Programs

  • Mathematica
    Flatten[ Nest[ Flatten[ # /. {1 -> {1, 2, 1}, 2 -> {2, 2, 2}} &], {1}, 5]]
  • PARI
    A088917(n) = { while(n, if(n%3==1, return(0), n\=3)); (1); }; \\ Originally from A005823
    A105220(n) = (2-A088917(n)); \\ Antti Karttunen, Aug 23 2019

Formula

a(n) = 2 - A088917(n) = 1 + A316829(n). - Antti Karttunen, Aug 24 2019
a(n) = 2 if the ternary expansion of n contains the digit 1, otherwise a(n) = 1. - Joerg Arndt, Aug 24 2019

A368229 Irregular table of nonnegative integers T(n, k), n >= 0, k = 1..A001316(n), read by rows: the 1's in the binary expansion of n exactly match the nonzero digits in the ternary expansions of the terms in the n-th row.

Original entry on oeis.org

0, 1, 2, 3, 6, 4, 5, 7, 8, 9, 18, 10, 11, 19, 20, 12, 15, 21, 24, 13, 14, 16, 17, 22, 23, 25, 26, 27, 54, 28, 29, 55, 56, 30, 33, 57, 60, 31, 32, 34, 35, 58, 59, 61, 62, 36, 45, 63, 72, 37, 38, 46, 47, 64, 65, 73, 74, 39, 42, 48, 51, 66, 69, 75, 78
Offset: 0

Views

Author

Rémy Sigrist, Dec 18 2023

Keywords

Comments

As a flat sequence, this is a permutation of the nonnegative integers (with inverse A368230).

Examples

			Table T(n, k) begins:
    0;
    1, 2;
    3, 6;
    4, 5, 7, 8;
    9, 18;
    10, 11, 19, 20;
    12, 15, 21, 24;
    13, 14, 16, 17, 22, 23, 25, 26;
    27, 54;
    28, 29, 55, 56;
    30, 33, 57, 60;
    31, 32, 34, 35, 58, 59, 61, 62;
    36, 45, 63, 72;
    37, 38, 46, 47, 64, 65, 73, 74;
    39, 42, 48, 51, 66, 69, 75, 78;
    40, 41, 43, 44, 49, 50, 52, 53, 67, 68, 70, 71, 76, 77, 79, 80;
    81, 162;
    ...
		

Crossrefs

See A368225 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], b = binary(n)); for (k = 1, #b, r = [3*v+b[k]|v<-r]; if (b[k], r = concat(r, [v+1|v<-r]););); Set(r); }

Formula

T(n, 1) = A005836(n + 1).
T(n, A001316(n)) = A005823(n + 1).
A289831(T(n, k)) = n.

A097261 Numbers whose set of base 15 digits is {0,E}, where E base 15 = 14 base 10.

Original entry on oeis.org

0, 14, 210, 224, 3150, 3164, 3360, 3374, 47250, 47264, 47460, 47474, 50400, 50414, 50610, 50624, 708750, 708764, 708960, 708974, 711900, 711914, 712110, 712124, 756000, 756014, 756210, 756224, 759150, 759164, 759360, 759374, 10631250
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 15 for every i.

Crossrefs

Programs

  • Magma
    [n: n in [0..4500000] | Set(IntegerToSequence(n, 15)) subset {0, 14}]; // Vincenzo Librandi, Jun 05 2012
  • Mathematica
    f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 14}, 15]; Array[f, 33, 0] (* or *)
    FromDigits[#, 15] & /@ Tuples[{0, 14}, 6] (* Harvey P. Dale, Sep 22 2011 *) (* or much slower *)
    fQ[n_] := Union@ Join[{0, 14}, IntegerDigits[n, 15]] == {0, 14}; Select[ Range[0, 10634414 ], fQ] (* Robert G. Wilson v, May 12 2012 *)

Formula

a(n) = 14*A033051(n).
a(2n) = 15*a(n), a(2n+1) = a(2n)+14.

A117496 Numbers with no 1's in base 3 & 4 expansions.

Original entry on oeis.org

0, 2, 8, 56, 60, 62, 162, 168, 170, 186, 188, 224, 234, 236, 240, 242, 512, 546, 558, 560, 648, 650, 654, 672, 674, 702, 704, 2106, 2108, 2178, 2184, 2186, 13184, 13194, 13196, 13290, 13292, 13304, 13308, 13310, 14586, 14588, 15072, 15074, 15084, 15086
Offset: 1

Views

Author

Zak Seidov, Apr 26 2006

Keywords

Comments

All terms are even. Intersection of A005823 & A023709.

Crossrefs

Programs

  • Maple
    f:= proc(r) local L,n,i;
      L:= convert(r,base,2);
      n:= add(2*3^(i-1)*L[i],i=1..nops(L));
      if has(convert(n,base,4),1) then NULL else n fi
    end proc:
    map(f, [$0..10000]); # Robert Israel, Feb 04 2016
  • Mathematica
    Select[Range[0,42000,2],FreeQ[Flatten[{IntegerDigits[ #,4],IntegerDigits[ #,3]}],1]&]
Previous Showing 31-40 of 60 results. Next