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 11-20 of 60 results. Next

A097251 Numbers whose set of base 5 digits is {0,4}.

Original entry on oeis.org

0, 4, 20, 24, 100, 104, 120, 124, 500, 504, 520, 524, 600, 604, 620, 624, 2500, 2504, 2520, 2524, 2600, 2604, 2620, 2624, 3000, 3004, 3020, 3024, 3100, 3104, 3120, 3124, 12500, 12504, 12520, 12524, 12600, 12604, 12620, 12624, 13000, 13004, 13020
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 5 for every i.
The first 2^n terms of the sequence could be obtained using the Cantor-like process for the segment [0,5^n-1]. For example, for n=1 we have [0, {1,2,3},4] such that numbers outside of braces are the first 2 terms of the sequence; for n=2 we have [0, {1,2,3}, 4, {5,...,19}, 20, {21,22,23}, 24] such that the numbers outside of braces are the first 4 terms of the sequence, etc. - Vladimir Shevelev, Dec 17 2012

Crossrefs

Programs

  • Magma
    [n: n in [0..20000] | Set(IntegerToSequence(n, 5)) subset {0, 4}]; // Vincenzo Librandi, May 25 2012
    
  • Mathematica
    fQ[n_]:=Union@Join[{0,4},IntegerDigits[n,5]]=={0,4};Select[Range[0,20000],fQ] (* Vincenzo Librandi, May 25 2012 *)
    FromDigits[#,5]&/@Tuples[{0,4},6] (* Harvey P. Dale, Feb 01 2015 *)
  • Maxima
    a[0]:0$ a[n]:=5*a[floor(n/2)]+2*(1-(-1)^n)$ makelist(a[n], n, 0, 42); /* Bruno Berselli, May 25 2012 */
    
  • PARI
    a(n) = 4*fromdigits(binary(n),5); \\ Kevin Ryde, Jun 03 2020

Formula

a(n) = 4*A033042(n).
a(2n) = 5*a(n), a(2n+1) = a(2n)+4.

A121153 Numbers k with the property that 1/k can be written in base 3 in such a way that the fractional part contains no 1's.

Original entry on oeis.org

1, 3, 4, 9, 10, 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

Jack W Grahl, Aug 12 2006

Keywords

Comments

Numbers k such that 1/k is in the Cantor set.
A subsequence of A054591. The first member of A054591 which does not belong to this sequence is 146. See A135666.
This is not a subsequence of A005836 (949 belongs to the present sequence but not to A005836). See A170830, A170853.

Examples

			1/3 in base 3 can be written as either .1 or .0222222... The latter version contains no 1's, so 3 is in the sequence.
1/4 in base 3 is .02020202020..., so 4 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    (* Mma code from T. D. Noe, Feb 20 2010. This produces the sequence except for the powers of 3. *)
    (* Find the length of the periodic part of the fraction: *)
    FracLen[n_] := Module[{r = n/3^IntegerExponent[n, 3]}, MultiplicativeOrder[3, r]]
    (* Generate the fractions and select those that have no 1's: *)
    Select[Range[100000], ! MemberQ[Union[RealDigits[1/#, 3, FracLen[ # ]][[1]]], 1] &]
  • PARI
    is(n,R=divrem(3^logint(n,3),n),S=0)={while(R[1]!=1&&!bittest(S,R[2]), S+=1<M. F. Hasler, Feb 27 2018

Extensions

Extended to 10^5 by T. D. Noe and N. J. A. Sloane, Feb 20 2010
Entry revised by N. J. A. Sloane, Feb 22 2010

A055246 At step number k >= 1 the 2^(k-1) open intervals that are erased from [0,1] in the Cantor middle-third set construction are I(k,n) = (a(n)/3^k, (1+a(n))/3^k), n=1..2^(k-1).

Original entry on oeis.org

1, 7, 19, 25, 55, 61, 73, 79, 163, 169, 181, 187, 217, 223, 235, 241, 487, 493, 505, 511, 541, 547, 559, 565, 649, 655, 667, 673, 703, 709, 721, 727, 1459, 1465, 1477, 1483, 1513, 1519, 1531, 1537, 1621, 1627, 1639, 1645, 1675, 1681, 1693, 1699
Offset: 1

Views

Author

Wolfdieter Lang, May 23 2000

Keywords

Comments

Related to A005836. Gives boundaries of open intervals that have to be erased in the Cantor middle-third set construction.
Let g(n) = Sum_{i=0..n} (i*binomial(n+i,i)^3*binomial(n,i)^2) = A112035(n). Let b = {m>0 : g(m) != 0 (mod 3)}. Then b(n) = a(n). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 08 2004
Conjecture: Similarly to A191107, this increasing sequence is generated by the rules: a(1) = 1, and if x is in the sequence, then 3*x-2 and 3*x+4 are also in the sequence. - L. Edson Jeffery, Nov 17 2015

Examples

			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); ...
		

Crossrefs

Programs

  • Mathematica
    (* (Conjectured) Choose rows large enough to guarantee that all terms < max are generated. *)
    rows = 1000; max = 10^4; a[1] = {1}; i = 1; Do[a[n_] = {}; Do[If[1 < 3*a[n - 1][[k]] - 2 < max, AppendTo[a[n], 3*a[n - 1][[k]] - 2], Break]; If[3*a[n - 1][[k]] + 4 < max, AppendTo[a[n], 3*a[n - 1][[k]] + 4], Break], {k, Length[a[n - 1]]}]; If[a[n] == {}, Break, i++], {n, 2, 1000}]; a055246 = Take[Flatten[Table[a[n], {n, i}]], 48] (* L. Edson Jeffery, Nov 17 2015 *)
    Join[{1}, 1 + 6 Accumulate[Table[(3^IntegerExponent[n, 2] + 1)/2, {n, 60}]]] (* Vincenzo Librandi, Nov 26 2015 *)
  • PARI
    g(n)=sum(i=0,n,i*binomial(n+i,i)^3*binomial(n,i)^2);
    for (i=1,2000,if(Mod(g(i),3)<>0,print1(i,",")))
    
  • PARI
    a(n) = fromdigits(binary(n-1),3)*6 + 1; \\ Kevin Ryde, Apr 23 2021
    
  • Python
    def A055246(n): return int(bin(n-1)[2:],3)*6|1 # Chai Wah Wu, Jun 26 2025

Formula

a(n) = 1+6*A005836(n), n >= 1.
a(n) = 1+3*A005823(n), n >= 1.
a(n+1) = A074938(n) + A074939(n); A074938: odd numbers in A005836, A074939: even numbers in A005836. - Philippe Deléham, Jul 10 2005
Conjecture: a(n) = 2*A191107(n) - 1 = 6*A003278(n) - 5 = (a((2*n-1)*2^(k-1))+2)/3^k, k>0. - L. Edson Jeffery, Nov 25 2015

Extensions

Edited by N. J. A. Sloane, Nov 20 2015: used first comment to give more precise definition, and edited a comment at the suggestion of L. Edson Jeffery.

A081606 Numbers having at least one 1 in their ternary representation.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 75, 76, 77, 79, 81, 82, 83, 84, 85, 86
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 23 2003

Keywords

Comments

Complement of A005823.
Integers m such that central Delannoy number A001850(m) == 0 (mod 3). - Emeric Deutsch and Bruce E. Sagan, Dec 04 2003
Integers m such that A026375(m) == 0 (mod 3). - Fabio Visonà, Aug 03 2023

Crossrefs

Programs

  • Mathematica
    Select[Range[100],DigitCount[#,3,1]>0&] (* Harvey P. Dale, Nov 26 2022 *)
  • Python
    from itertools import count, islice
    def A081606_gen(): # generator of terms
        a = 0
        for n in count(1):
            b = int(bin(n)[2:],3)<<1
            yield from range(a+1,b)
            a = b
    A081606_list = list(islice(A081606_gen(),30)) # Chai Wah Wu, Oct 13 2023
    
  • Python
    from gmpy2 import digits
    def A081606(n):
        def f(x):
            s = digits(x>>1,3)
            for i in range(l:=len(s)):
                if s[i]>'1':
                    break
            else:
                return n+int(s,2)
            return n-1+(int(s[:i] or '0',2)+1<Chai Wah Wu, Oct 29 2024

Extensions

More terms from Emeric Deutsch and Bruce E. Sagan, Dec 04 2003

A250047 Numbers n such that m = floor(n/7) is not coprime to n and, if nonzero, m is also a term of the sequence.

Original entry on oeis.org

2, 3, 4, 5, 6, 14, 16, 18, 20, 21, 24, 27, 28, 30, 32, 34, 35, 40, 42, 44, 45, 46, 48, 98, 100, 102, 104, 112, 114, 116, 118, 126, 128, 129, 130, 132, 140, 142, 144, 145, 146, 147, 150, 153, 168, 170, 171, 172, 174, 189, 192, 195, 196, 198, 200, 202, 210
Offset: 1

Views

Author

Stanislav Sykora, Jan 15 2015

Keywords

Comments

See the comments in A250041 which all apply, except for the setting of the base, b=7. In particular, they define the property RTNC(b).

Crossrefs

Cf. A250041 (b=10), A250046.
Other lists of right-truncatable numbers with the property RTNC(b):
A005823 (b=3), A250037 (b=4), A250039 (b=16), A250043 (b=9), A250045 (b=8), A250049 (b=6), A250051 (b=5).

Programs

  • PARI
    See the link
    
  • PARI
    is_rtnc(n, b=7) = {while (((m=gcd(n\b, n)) != 1), if (m == 0, return (1)); n = n\b; ); return (0); } \\ Michel Marcus, Jan 22 2015

A088917 Central Delannoy numbers (mod 3); Characteristic function for Cantor set.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 30 2003

Keywords

Comments

Also Apery numbers (mod 3).
More generally also (Sum_{k=0..n} binomial(n,k)^x*binomial(n+k,k)^y) (mod 3) for any x >= 1 in N and any odd y >= 1.
a(n) = 0 if the ternary expansion of n contains one or more 1-digits, otherwise 1. - Antti Karttunen, Aug 23 2019
Main diagonal of the Sierpinski carpet (A153490). - Paolo Xausa, May 19 2023

Crossrefs

Characteristic function of A005823, and with offset 1, characteristic function of A191106.

Programs

  • Mathematica
    Nest[ Flatten[# /. {0 -> {0, 0, 0}, 1 -> {1, 0, 1}}] &, {1}, 5] (* Or *)
    f[n_] := Mod[LegendreP[n, 3], 3]; Array[f, 111, 0] (* Or *)
    f[n_] := If[ FreeQ[ IntegerDigits[n, 3], 1], 1, 0]; Array[f, 111, 0] (* also from Mathematica v8.0 Mathematical Functions Help section for "IntegerDigits" "Cantor set construction:" *) (* Robert G. Wilson v, Jun 16 2011 *)
    Nest[Join[#, 0 #, #] &, {1}, 5] (* IWABUCHI Yu(u)ki, Sep 08 2012 *)
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*binomial(n+k,k))%3
    
  • PARI
    A088917(n) = { while(n, if(n%3==1, return(0), n\=3)); (1); }; \\ Antti Karttunen, Aug 23 2019 (copied from A005823)
    
  • PARI
    A088917(n) = abs(factorback(apply(d -> d-1,digits(n,3)))); \\ Antti Karttunen, Aug 23 2019

Formula

a(A005823(n)) = 1; a(A081606(n)) = 0.
a(n) = A001850(n) - 3*floor(A001850(n)/3).
a(n) = 2 - A105220(n) = 1 - A316829(n). - Antti Karttunen and Jon Maiga, Aug 24 2019
G.f.: Product_{k>=0} (1 + x^(2*3^k)). - Ilya Gutkovskiy, Jun 05 2021

Extensions

Secondary name added by Antti Karttunen, Aug 23 2019

A097256 Numbers whose set of base 10 digits is {0,9}.

Original entry on oeis.org

0, 9, 90, 99, 900, 909, 990, 999, 9000, 9009, 9090, 9099, 9900, 9909, 9990, 9999, 90000, 90009, 90090, 90099, 90900, 90909, 90990, 90999, 99000, 99009, 99090, 99099, 99900, 99909, 99990, 99999, 900000, 900009, 900090, 900099, 900900
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 10 for every i.

Crossrefs

Programs

  • Haskell
    a097256 n = a097256_list !! n
    a097256_list = map (* 9) a007088_list
    -- Reinhard Zumkeller, Jan 10 2012
  • Maple
    A097256:=n->(9/2) * add((1-(-1)^floor(n/2^i))*10^i, i=0..n); seq(A097256(n), n=0..30); # Wesley Ivan Hurt, Feb 11 2014
  • Mathematica
    Table[(9/2) Sum[(1 - (-1)^Floor[n/2^i]) 10^i, {i, 0, n}], {n, 0, 30}] (* Wesley Ivan Hurt, Feb 11 2014 *)

Formula

a(n) = 9*A007088(n).
a(2n) = 10*a(n), a(2n+1) = a(2n)+9.

A191108 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x+2 are in a.

Original entry on oeis.org

1, 5, 13, 17, 37, 41, 49, 53, 109, 113, 121, 125, 145, 149, 157, 161, 325, 329, 337, 341, 361, 365, 373, 377, 433, 437, 445, 449, 469, 473, 481, 485, 973, 977, 985, 989, 1009, 1013, 1021, 1025, 1081, 1085, 1093, 1097, 1117, 1121, 1129, 1133, 1297, 1301, 1309, 1313, 1333, 1337, 1345, 1349, 1405, 1409, 1417, 1421, 1441, 1445
Offset: 1

Views

Author

Clark Kimberling, May 26 2011

Keywords

Comments

See discussions at A190803, A191106. The sequence a=A191108 has closure properties: the positive integers in (2+A191108)/3 comprise A191108, as do those in (-2+A191108)/3.
From Peter Munn, May 13 2019: (Start)
The closure of {1} in the positive integers under reflection about 3^k, k >= 1.
Asymptotic density is 0.
Consider a Sierpinski arrowhead curve formed of edges numbered consecutively from 0 at its axis of symmetry. The m-th edge is contained in the boundary of the plane sector occupied by the arrowhead if and only if m or -m is in this sequence.
For k >= 0, a(2^k) = 2*3^k - 1 and {a(i)/(2*3^k) | 1 <= i <= 2^k} is the set of center points of surviving intervals at the k-th step of generating the Cantor set, and therefore the set of center points of deleted middle-third intervals at the (k+1)-th step.
Define t: Z -> P(R) so that t(n) is the translated Cantor ternary set spanning [(n-1)/2, (n+1)/2], and let T be the union of t(a(n)) for all n. T = T * 3 = T / 3 is the closure of the Cantor ternary set under multiplication by 3.
(End)

Crossrefs

Programs

  • Mathematica
    h = 3; i = -2; j = 3; k = 2; f = 1; g = 7;
    a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A191108 *)
    b = (a + 2)/3; c = (a - 2)/3; r = Range[1, 900];
    d = Intersection[b, r] (* A191108 closure property  *)
    e = Intersection[c, r] (* A191108 closure property  *)
  • PARI
    a(n) = fromdigits(binary(n-1),3)<<2 + 1; \\ Kevin Ryde, Aug 05 2022

Formula

From Peter Munn, May 25 2019: (Start)
a(n) = (A055247(2n-1) + A055247(2n)) / 3.
a(n) = A306556(2n)*2 - 1 = A306556(2n-1) + A306556(2n).
a(n) = 2*A005823(n) + 1 = 4*A005836(n) + 1 = 2*A191106(n) - 1.
a(2^k+i) = 2*A147991(2^k+i-1) + 3^(k+1) for k >= 0, 1 <= i <= 2^k.
(End)

A250037 Numbers n such that m = floor(n/4) is not coprime to n and, if nonzero, m is also a term of the sequence.

Original entry on oeis.org

2, 3, 8, 10, 12, 15, 32, 34, 40, 42, 48, 50, 51, 60, 63, 128, 130, 136, 138, 160, 162, 168, 170, 171, 192, 194, 195, 200, 202, 204, 207, 240, 242, 243, 252, 255, 512, 514, 520, 522, 544, 546, 552, 554, 555, 640, 642, 648, 650, 651, 672, 674, 675, 680, 682
Offset: 1

Views

Author

Stanislav Sykora, Dec 07 2014

Keywords

Comments

See the comments in A250041 which all apply, except for the setting of the base, b=4. In particular, they define the property RTNC(b).
If x =12*k+j, 0 <= j <= 11, then x is in the sequence iff either j is in {0,2,3} and 3*k is in the sequence, or j is in {4,6} and 3*k+1 is in the sequence, or j is in {8,10} and 3*k+2 is in the sequence. - Robert Israel, Dec 22 2014

Crossrefs

Other lists of right-truncatable numbers with the property RTNC(b):
A005823 (b=3), A250039 (b=16), A250041 (b=10), A250043 (b=9), A250045 (b=8), A250047 (b=7), A250049 (b=6), A250051 (b=5).

Programs

  • Maple
    S:= {}:
    for n from 1 to 1000 do
      m:= floor(n/4);
      if igcd(m,n) = 1 then next fi;
      if m > 0 and not member(m,S) then next fi;
      S:= S union {n}
    od:
    S; # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(S,list)); # Robert Israel, Dec 22 2014
  • PARI
    See the link.
    
  • PARI
    is_rtnc(n, b=4) = {while (((m=gcd(n\b, n)) != 1), if (m == 0, return (1)); n = n\b; ); return (0); } \\ Michel Marcus, Jan 22 2015

A250039 Numbers n such that m = floor(n/16) is not coprime to n and, if nonzero, m is also a term of the sequence.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 32, 34, 36, 38, 40, 42, 44, 46, 48, 51, 54, 57, 60, 63, 64, 66, 68, 70, 72, 74, 76, 78, 80, 85, 90, 95, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 111, 112, 119, 126, 128, 130, 132, 134, 136, 138, 140, 142
Offset: 1

Views

Author

Stanislav Sykora, Dec 07 2014

Keywords

Comments

See the comments in A250041 which all apply, except for the setting of the base, b=16. In particular, they define the property RTNC(b).
This list is an infinite subset of A248502 with which it shares the first 111 entries.

Crossrefs

Other lists of right-truncatable numbers with the property RTNC(b): A005823 (b=3), A250037 (b=4), A250041 (b=10), A250043 (b=9), A250045 (b=8), A250047 (b=7), A250049 (b=6), A250051 (b=5).

Programs

  • PARI
    See the link.
    
  • PARI
    is_rtnc(n, b=16) = {while (((m=gcd(n\b, n)) != 1), if (m == 0, return (1)); n = n\b; ); return (0); } \\ Michel Marcus, Jan 29 2015
Previous Showing 11-20 of 60 results. Next