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 51-60 of 60 results.

A097260 Numbers whose set of base 14 digits is {0,D}, where D base 14 = 13 base 10.

Original entry on oeis.org

0, 13, 182, 195, 2548, 2561, 2730, 2743, 35672, 35685, 35854, 35867, 38220, 38233, 38402, 38415, 499408, 499421, 499590, 499603, 501956, 501969, 502138, 502151, 535080, 535093, 535262, 535275, 537628, 537641, 537810, 537823, 6991712
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 14 for every i.

Crossrefs

Programs

  • Mathematica
    FromDigits[#,14]&/@Tuples[{0,13},6] (* Harvey P. Dale, Sep 22 2011 *)

Formula

a(n) = 13*A033050(n).
a(2n) = 14*a(n), a(2n+1) = a(2n)+13.

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

Views

Author

N. J. A. Sloane, May 15 2011

Keywords

Crossrefs

Subsequence of A005823.
Cf. A005836.

Programs

  • Mathematica
    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 *)
  • PARI
    is(n)=n%3==2 && setsearch(Set(digits(n,3)), 1)==0 \\ Charles R Greathouse IV, Aug 24 2016
    
  • PARI
    a(n)=2*fromdigits(binary(2*n-1),3) \\ Charles R Greathouse IV, Aug 24 2016

Formula

Conjecture: a(n) = A055246(n) + 1. - Michel Marcus, Aug 24 2016
a(n) = A005823(2n). - Charles R Greathouse IV, Aug 24 2016

A249102 Numbers with no 1's in base-7 expansion.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 98, 100, 101, 102, 103, 104, 112, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133
Offset: 1

Views

Author

Zak Seidov, Oct 21 2014

Keywords

Examples

			14_10 = 20_7, 16_10 = 22_10, 17_10 = 23_7.
14 in base 7 is 20, which contains no 1s, so 14 is in the sequence.
15 in base 7 is 21, which contains one 1, so 15 is not in the sequence.
16 in base 7 is 22, so 16 is in the sequence.
		

Crossrefs

Subsequence of A047306. Cf. A023721, A023725, A023729, A023733, A005823. This sequence has no terms in common with A016993.

Programs

  • Mathematica
    Select[Range[0, 200], FreeQ[IntegerDigits[#, 7], 1] &] (* Seidov *)
    Select[Range[0, 139], DigitCount[#, 7, 1] == 0 &] (* Alonso del Arte, Oct 26 2014 *)
  • PARI
    fromdigits(v, b=10)=subst(Pol(v), 'x, b) \\ needed for gp < 2.63 or so
    a(n)=a(n)=fromdigits(apply(k->if(k, k+1, 0), digits(n, 6)),7) \\ Charles R Greathouse IV, Oct 30 2014

A293390 Least m such that the exponents in expression for n as a sum of distinct powers of 2 are pairwise distinct mod m; a(0) = 0 by convention.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 3, 1, 2, 3, 4, 2, 4, 3, 4, 1, 3, 2, 5, 3, 3, 4, 5, 2, 5, 4, 5, 3, 5, 4, 5, 1, 2, 3, 3, 2, 4, 5, 6, 3, 4, 3, 6, 4, 4, 5, 6, 2, 3, 5, 6, 4, 6, 5, 6, 3, 6, 5, 6, 4, 6, 5, 6, 1, 4, 2, 4, 3, 5, 3, 7, 2, 4, 4, 4, 5, 5, 6, 7, 3, 5, 4, 7, 3, 5, 6
Offset: 0

Views

Author

Rémy Sigrist, Oct 08 2017

Keywords

Comments

The set of exponents in expression for n as a sum of distinct powers of 2 corresponds to the n-th row of A133457.
The sum of digits of n in base 2^a(n), say s, can be computed without carry in base 2; the Hamming weight of s equals the Hamming weight of n.
a(n) >= A000120(n) for any n > 0.
Apparently, a(n) = A000120(n) iff n = 0 or n belongs to A100290.
a(n) <= A070939(n) for any n >= 0.
For any sequence s of distinct nonnegative integers (s(n) being defined for n >= 0):
- let D_s be defined for any n > 0 by D_s(n) = a(Sum_{k=0..n-1} 2^s(k)),
- then D_s is the discriminator of s as introduced by Arnold, Benkoski, and McCabe in 1985,
- D_s(1) = 1,
- D_s(n) >= n for any n >= 1,
- D_s(n+1) >= D_s(n) for any n >= 1.

Examples

			For n=42:
- 42 = 2^5 + 2^3 + 2^1,
- 5 mod 1 = 3 mod 1,
- 5 mod 2 = 3 mod 2,
- 5 mod 3, 3 mod 3 and 1 mod 3 are all distinct,
- hence a(42) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,D,k;
      L:= convert(n,base,2);
      L:= select(t -> L[t+1]=1, [$0..nops(L)-1]);
      if nops(L) = 1 then return 1 fi;
      D:= {seq(seq(L[j]-L[i],i=1..j-1),j=2..nops(L))};
      D:= `union`(seq(numtheory:-divisors(i),i=D));
      min({$2..max(D)+1} minus D)
    end proc:
    0, seq(f(i),i=1..100); # Robert Israel, Oct 08 2017
  • Mathematica
    {0}~Join~Table[Function[r, SelectFirst[Range@ 10, Length@ Union@ Mod[r, #] == Length@ r &]][Join @@ Position[#, 1] - 1 &@ Reverse@ IntegerDigits[n, 2]], {n, 86}] (* Michael De Vlieger, Oct 08 2017 *)
  • PARI
    a(n) = if (n, my (d=Vecrev(binary(n)), x = []); for (i=1, #d, if (d[i], x = concat(x, i-1))); for (m=1, oo, if (#Set(vector(#x, i, x[i]%m))==#x, return (m))), return (0))

Formula

a(2*n) = a(n) for any n >= 0.
a(2^k-1) = k for any k >= 0.
a(n) = 1 iff n = 2^k for some k >= 0.
a(n) = 2 iff n belongs to A173195.
a(Sum_{k=1..n} 2^(k^2)) = A016726(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000069(k)) = A062383(n) for any n >= 1.
a(Sum_{k=0..n} 2^(2^k)) = A270097(n) for any n >= 0.
a(Sum_{k=1..n} 2^A000045(k+1)) = A270151(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000041(k)) = A270176(n) for any n >= 1.
a(A076793(n)) = A272633(n) for any n >= 0.
a(Sum_{k=1..n} 2^A001969(k)) = A272881(n) for any n >= 1.
a(Sum_{k=1..n} 2^A005823(k)) = A272882(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000215(k-1)) = A273037(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000108(k)) = A273041(n) for any n >= 1.
a(Sum_{k=1..n} 2^A001566(k)) = A273043(n) for any n >= 1.
a(Sum_{k=1..n} 2^A003095(k)) = A273044(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000058(k-1)) = A273056(n) for any n >= 1.
a(Sum_{k=1..n} 2^A002808(k)) = A273062(n) for any n >= 1.
a(Sum_{k=1..n} 2^(k!)) = A273064(n) for any n >= 1.
a(Sum_{k=1..n} 2^(k^k)) = A273068(n) for any n >= 1.
a(Sum_{k=1..n} 2^A000110(k)) = A273237(n) for any n >= 1.
a(Sum_{k=1..n} 2^A001147(k)) = A273377(n) for any n >= 1.

A039276 Numbers whose base-3 representation has the same nonzero number of 0's and 2's.

Original entry on oeis.org

6, 11, 15, 19, 21, 32, 34, 38, 42, 46, 48, 56, 58, 60, 64, 66, 72, 89, 95, 97, 101, 103, 105, 113, 115, 119, 123, 127, 129, 137, 139, 141, 145, 147, 153, 167, 169, 173, 175, 177, 181, 183, 191, 193, 195, 199, 201, 207, 217, 219, 225, 260, 266, 268, 278, 284
Offset: 1

Views

Author

Keywords

Crossrefs

Supersequence of A044995.

Programs

  • Mathematica
    Select[Range[300],DigitCount[#,3,0]==DigitCount[#,3,2]>0&] (* Harvey P. Dale, May 10 2011 *)
  • Python
    from sympy.ntheory import count_digits
    def ok(n): d = count_digits(n, 3); return 0 in d and 2 in d and d[0] == d[2]
    print(list(filter(ok, range(285)))) # Michael S. Branicky, Jun 11 2021

A117564 Numbers with no 1's in base 3, 4 & 10 expansions.

Original entry on oeis.org

0, 2, 8, 56, 60, 62, 224, 234, 236, 240, 242, 546, 558, 560, 648, 650, 654, 672, 674, 702, 704, 40992, 40994, 43746, 43758, 43760, 43820, 43904, 43962, 43964, 43976, 43980, 43982, 44226, 44232, 44234, 44280, 44282, 44286, 45224, 45258, 45260, 45704
Offset: 1

Views

Author

Zak Seidov, Apr 29 2006

Keywords

Crossrefs

Programs

  • Maple
    a:=proc(n) if member(1,convert(convert(n,base,3),set) union convert(convert(n,base,4),set) union convert(convert(n,base,10),set))=false then n else fi end: seq(a(n),n=0..46000); # Emeric Deutsch, Oct 10 2006
  • Mathematica
    n1Q[n_]:=DigitCount[n,3,1]==DigitCount[n,4,1]==DigitCount[n,10,1]==0; Select[Range[0,50000],n1Q] (* Harvey P. Dale, Sep 30 2012 *)

Extensions

More terms from Emeric Deutsch, Oct 10 2006

A343754 a(n) = 0, and for any n > 0, a(n+1) = a(n) - A065363(n) + 1.

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 3, 3, 4, 4, 3, 3, 2, 0, 3, 5, 6, 8, 9, 9, 10, 10, 9, 11, 12, 12, 13, 13, 12, 12, 11, 9, 10, 10, 9, 9, 8, 6, 5, 3, 0, 4, 7, 9, 12, 14, 15, 17, 18, 18, 21, 23, 24, 26, 27, 27, 28, 28, 27, 29, 30, 30, 31, 31, 30, 30, 29, 27, 30, 32, 33, 35, 36
Offset: 0

Views

Author

Rémy Sigrist, Apr 27 2021

Keywords

Comments

This sequence has connections with A296062 and the Takagi (or blancmange) curve:
- for any real number x,
- let s(x) = min(frac(x), 1-frac(x)) (this is the building block of the Takagi curve),
- let t(x) = min(1/3, s(x)),
- let f(x) = Sum_{k >= 0} t(x * 3^k) / 3^k,
- the scatterplot of the sequence in the range A003462(k)..A003462(k+1)
approaches the curve x -> f(x)*3^k for x in the range 0..1.

Crossrefs

Programs

  • PARI
    s=0; for (n=1, 73, print1 (s", "); m=n; while (m>1, s-=d=centerlift(Mod(m, 3)); m=(m-d)\3))

Formula

a(n) = n - A174574(n).
a(n) >= 0 with equality iff n belongs to A003462.
a(n) <= n/2 with equality iff n belongs to A005823.

A357616 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the number of 1's in the ternary expansion of n equals the number of 2's in the ternary expansion of a(n) and vice versa.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Oct 06 2022

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			The first terms, alongside their ternary expansions, are:
  n   a(n)  ter(n)  ter(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     2       1          2
   2     1       2          1
   3     6      10         20
   4     8      11         22
   5     5      12         12
   6     3      20         10
   7     7      21         21
   8     4      22         11
   9    18     100        200
  10    20     101        202
  11    11     102        102
  12    24     110        220
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

A081603(a(n)) = A062756(n).
A062756(a(n)) = A081603(n).
a(n) < 3^k iff n < 3^k.
a(n) = n iff n belongs to A039001.
Empirically:
- a(n) = n/2 iff n belongs to A005823,
- a(n) = 2*n iff n belongs to A005836.

A083904 G.f. 1/(1-x) * Sum_{k>=0} 3^k * x^2^(k+1)/(1+x^2^k).

Original entry on oeis.org

0, 1, 0, 4, 3, 1, 0, 13, 12, 10, 9, 4, 3, 1, 0, 40, 39, 37, 36, 31, 30, 28, 27, 13, 12, 10, 9, 4, 3, 1, 0, 121, 120, 118, 117, 112, 111, 109, 108, 94, 93, 91, 90, 85, 84, 82, 81, 40, 39, 37, 36, 31, 30, 28, 27, 13, 12, 10, 9, 4, 3, 1, 0, 364, 363, 361, 360
Offset: 1

Views

Author

Ralf Stephan, Jun 18 2003

Keywords

Comments

Distance to next number of form 2^k-1, written down in binary, then interpreted as ternary. Thus the numbers have no 2 in ternary representation.

Crossrefs

Programs

  • PARI
    for(n=1, 100, l=ceil(log(n)/log(2)); t=polcoeff(1/(1-x)*sum(k=0, l, 3^k*(x^2^(k+1))/(1+x^2^k)) + O(x^(n+1)), n); print1(t", "))

Formula

a(1)=0, a(2n) = 3a(n)+1, a(2n+1) = 3a(n).
a(n) = (1/2)*(3^(floor(log_2(n))+1)-1) - A005836(n).

A366344 Irregular triangle T(n, k), n >= 0, k = 1 or 2, read by rows; the n-th row contains two coprime positive integers whose prime factorizations are encoded in the ternary expansion of n (see Comments section for precise definition).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 3, 1, 4, 1, 3, 2, 1, 3, 2, 3, 1, 4, 5, 1, 6, 1, 5, 2, 9, 1, 8, 1, 9, 2, 5, 3, 10, 3, 3, 4, 1, 5, 2, 5, 1, 6, 3, 5, 4, 3, 3, 10, 1, 9, 2, 9, 1, 8, 7, 1, 10, 1, 7, 2, 15, 1, 12, 1, 15, 2, 7, 3, 14, 3, 5, 4, 25, 1, 18, 1, 25, 2, 27, 1, 16, 1, 27, 2
Offset: 0

Views

Author

Rémy Sigrist, Oct 07 2023

Keywords

Comments

The encoding used here is related to that used for the Doudna sequence (A005940):
- for any pair (u, v) of coprime positive integers, the ternary expansion of the unique n >= 0 such that T(n, 1) = u and T(n, 2) = v is built as follows (from right to left):
- for m = 1, 2, ..., let p be the m-th prime number,
- if p neither divides u nor v then we add a 0,
- if p divides u with multiplicity e then we add a run of e 1's,
- if p divides v with multiplicity e then we add a run of e 2's,
- we also insert an extra 0 between pairs of runs of 1's not separated by 2's and between pairs of runs of 2's not separated by 1's.
This encoding can be applied to any fixed base b >= 2 and will yield a bijection from the nonnegative integers to the set of tuples of b-1 pairwise coprime positive integers.
The case b = 2 corresponds (up to the offset) to the Doudna sequence (A005940).
The sequence n -> T(n, 1) / T(n, 2) runs through all the reduced positive rationals exactly once.

Examples

			Triangle T(n, k) begins (alongside the ternary expansion of n):
  n   n-th row  ter(n)
  --  --------  ------
   0  [1, 1]         0
   1  [2, 1]         1
   2  [1, 2]         2
   3  [3, 1]        10
   4  [4, 1]        11
   5  [3, 2]        12
   6  [1, 3]        20
   7  [2, 3]        21
   8  [1, 4]        22
   9  [5, 1]       100
  10  [6, 1]       101
  11  [5, 2]       102
  12  [9, 1]       110
  13  [8, 1]       111
  14  [9, 2]       112
  15  [5, 3]       120
  16  [10, 3]      121
  17  [3, 4]       122
		

Crossrefs

Programs

  • PARI
    row(n, b = 3) = { my (r = vector(b-1, d, 1), g = 0, t = 0); while (n, my (d = n % b); n \= b; g++; if (d, my (e = 1); while (n % b == d, e++; n \= b;); if (t==d, g--, t = d); r[d] *= prime(g)^e;);); return (r); }

Formula

T(n, 1) = 1 iff n belongs to A005823.
T(n, 2) = 1 iff n belongs to A005836.
T(A005836(n), 1) = A005940(n+1).
T(A005823(n), 2) = A005940(n+1).
A001222(T(n, 1)) = A062756(n).
A001222(T(n, 2)) = A081603(n).
A001222(T(n, 1) * T(n, 2)) = A160384(n).
T(A004488(n), 1) = T(n, 2).
T(A004488(n), 2) = T(n, 1).
T((3^e - 1)/2, 1) = 2^e for any e >= 0.
T(3^e - 1, 2) = 2^e for any e >= 0.
T(3^e, 1) = A000040(e + 1) for any e >= 0.
T(2 * 3^e, 2) = A000040(e + 1) for any e >= 0.
T(3*n, k) = A003961(T(n, k)).
Previous Showing 51-60 of 60 results.