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-10 of 12 results. Next

A073216 The terms of A055235 (sums of two powers of 3) divided by 2.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 14, 15, 18, 27, 41, 42, 45, 54, 81, 122, 123, 126, 135, 162, 243, 365, 366, 369, 378, 405, 486, 729, 1094, 1095, 1098, 1107, 1134, 1215, 1458, 2187, 3281, 3282, 3285, 3294, 3321, 3402, 3645, 4374, 6561, 9842, 9843, 9846, 9855, 9882, 9963, 10206, 10935, 13122, 19683
Offset: 0

Views

Author

Jeremy Gardiner, Jul 21 2002

Keywords

Comments

n such that 3 is the largest power of 3 dividing binomial(3n,n). - Benoit Cloitre, Jan 01 2004
Equals A023745 + 1.
This sequence is A007051 together with its (successive) multiples by (powers of) 3. - R. K. Guy, Oct 08 2011

Examples

			T(2,0) = 5 = (3^2 + 3^0) / 2.
Triangle begins:
     1;
     2,    3;
     5,    6,    9;
    14,   15,   18,   27;
    41,   42,   45,   54,   81;
   122,  123,  126,  135,  162,  243;
   365,  366,  369,  378,  405,  486,  729;
  1094, 1095, 1098, 1107, 1134, 1215, 1458, 2187;
  ...
		

Crossrefs

Cf. A000244 (main diagonal), A055235, A007051 (first column), A023745.
T(2n,n) gives A025551.

Programs

  • Python
    from math import isqrt
    def A073216(n): return 3**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+3**(n-1-(a*(a+1)>>1))>>1 # Chai Wah Wu, Apr 08 2025

Formula

T(n,m) = (3^n + 3^m) / 2, n = 0, 1, 2, 3 ..., m = 0, 1, 2, 3, ... n.

Extensions

Edited by Jeremy Gardiner, Oct 08 2011
Offset changed by Alois P. Heinz, Apr 08 2025

A226636 Numbers whose base-3 sum of digits is 3.

Original entry on oeis.org

5, 7, 11, 13, 15, 19, 21, 29, 31, 33, 37, 39, 45, 55, 57, 63, 83, 85, 87, 91, 93, 99, 109, 111, 117, 135, 163, 165, 171, 189, 245, 247, 249, 253, 255, 261, 271, 273, 279, 297, 325, 327, 333, 351, 405, 487, 489, 495, 513, 567, 731, 733, 735, 739, 741, 747, 757
Offset: 1

Views

Author

Tom Edgar, Aug 31 2013

Keywords

Comments

All of the entries are odd.
Subsequence of A005408. - Michel Marcus, Sep 03 2013
In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - M. F. Hasler, Dec 23 2016

Examples

			The ternary expansion of 5 is (1,2), which has sum of digits 3.
The ternary expansion of 31 is (1,0,0,2), which has sum of digits 3.
10 is not on the list since the ternary expansion of 10 is (1,0,1), which has sum of digits 2 not 3.
		

Crossrefs

Cf. A226969 (b = 4), A227062 (b = 5), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10).

Programs

  • Maple
    N:= 10: # for all terms < 3^(N+1)
    [seq(seq(seq(3^a+3^b+3^c, c=0..`if`(b=a, b-1,b)),b = 0..a),a=0..N)]; # Robert Israel, Jun 05 2018
  • Mathematica
    Select[Range@ 757, Total@ IntegerDigits[#, 3] == 3 &] (* Michael De Vlieger, Dec 23 2016 *)
  • PARI
    select( is(n)=sumdigits(n,3)==3, [1..999]) \\ M. F. Hasler, Dec 23 2016
    
  • Python
    from itertools import islice
    def nextsod(n, base):
        c, b, w = 0, base, 0
        while True:
            d = n%b
            if d+1 < b and c:
                return (n+1)*b**w + ((c-1)%(b-1)+1)*b**((c-1)//(b-1))-1
            c += d; n //= b; w += 1
    def A226636gen(sod=3, base=3): # generator of terms for any sod, base
        an = (sod%(base-1)+1)*base**(sod//(base-1))-1
        while True: yield an; an = nextsod(an, base)
    print(list(islice(A226636gen(), 57))) # Michael S. Branicky, Jul 10 2022, generalizing the code by M. F. Hasler in A052224
  • Sage
    [i for i in [0..1000] if sum(Integer(i).digits(base=3))==3]
    

Formula

a(k^3/6 + k^2 + 5*k/6 + j) = 3^(k+1) + A055235(j-1) for 1 <= j <= k^2/2+5*k/2+2. - Robert Israel, Jun 05 2018

A073211 Sum of two powers of 11.

Original entry on oeis.org

2, 12, 22, 122, 132, 242, 1332, 1342, 1452, 2662, 14642, 14652, 14762, 15972, 29282, 161052, 161062, 161172, 162382, 175692, 322102, 1771562, 1771572, 1771682, 1772892, 1786202, 1932612, 3543122, 19487172, 19487182, 19487292, 19488502, 19501812, 19648222, 21258732, 38974342
Offset: 0

Views

Author

Jeremy Gardiner, Jul 20 2002

Keywords

Examples

			T(2,0) = 11^2 + 11^0 = 122.
Table T(n,m) begins:
      2;
     12,    22;
    122,   132,   242;
   1332,  1342,  1452,  2662;
  14642, 14652, 14762, 15972, 29282;
  ...
		

Crossrefs

Cf. A001020 (powers of 11).
Equals twice A073219.
Sums of two powers of n: A073423 (0), A007395 (1), A173786 (2), A055235 (3), A055236 (4), A055237 (5), A055257 (6), A055258 (7), A055259 (8), A055260 (9), A052216 (10), A194887 (12), A072390 (13), A055261 (16), A073213 (17), A073214 (19), A073215 (23).

Programs

  • Mathematica
    t = 11^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
  • Python
    from math import isqrt
    def A073211(n): return 11**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+11**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 09 2025

Formula

T(n,m) = 11^n + 11^m, n = 0, 1, 2, 3, ..., m = 0, 1, 2, 3, ... n.
Bivariate g.f.: (2 - 12*x)/((1 - x)*(1 - 11*x)*(1 - 11*x*y)). - J. Douglas Morrison, Jul 26 2021

A073213 Sum of two powers of 17.

Original entry on oeis.org

2, 18, 34, 290, 306, 578, 4914, 4930, 5202, 9826, 83522, 83538, 83810, 88434, 167042, 1419858, 1419874, 1420146, 1424770, 1503378, 2839714, 24137570, 24137586, 24137858, 24142482, 24221090, 25557426, 48275138, 410338674, 410338690, 410338962, 410343586, 410422194, 411758530, 434476242, 820677346
Offset: 0

Views

Author

Jeremy Gardiner, Jul 20 2002

Keywords

Examples

			T(2,0) = 17^2 + 17^0 = 290.
Table T(n,m) begins:
      2;
     18,    34;
    290,   306,   578;
   4914,  4930,  5202,  9826;
  83522, 83538, 83810, 88434, 167042;
  ...
		

Crossrefs

Cf. A001026 (powers of 17).
Equals twice A073221.
Sums of two powers of n: A073423 (0), A007395 (1), A173786 (2), A055235 (3), A055236 (4), A055237 (5), A055257 (6), A055258 (7), A055259 (8), A055260 (9), A052216 (10), A073211 (11), A194887 (12), A072390 (13), A055261 (16), A073214 (19), A073215 (23).

Programs

  • Mathematica
    Flatten[Table[Table[17^n + 17^m, {m, 0, n}], {n, 0, 7}]] (* T. D. Noe, Jun 18 2013 *)
    Union[Total/@Tuples[17^Range[0,10],2]] (* Harvey P. Dale, Apr 09 2015 *)
  • Python
    from math import isqrt
    def A073213(n): return 17**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+17**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 09 2025

Formula

T(n,m) = 17^n + 17^m, n = 0, 1, 2, 3, ..., m = 0, 1, 2, 3, ... n.
Bivariate g.f.: (2 - 18*x)/((1 - x)*(1 - 17*x)*(1 - 17*x*y)). - J. Douglas Morrison, Jul 26 2021

A073214 Sum of two powers of 19.

Original entry on oeis.org

2, 20, 38, 362, 380, 722, 6860, 6878, 7220, 13718, 130322, 130340, 130682, 137180, 260642, 2476100, 2476118, 2476460, 2482958, 2606420, 4952198, 47045882, 47045900, 47046242, 47052740, 47176202, 49521980, 94091762, 893871740, 893871758, 893872100, 893878598, 894002060, 896347838, 940917620, 1787743478
Offset: 0

Views

Author

Jeremy Gardiner, Jul 20 2002

Keywords

Examples

			T(2,0) = 19^2 + 19^0 = 362.
Table begins:
       2;
      20,     38;
     362,    380,    722;
    6860,   6878,   7220,  13718;
  130322, 130340, 130682, 137180, 260642;
  ...
		

Crossrefs

Cf. A001029.
Equals twice A073222.
Sums of two powers of n: A073423 (0), A007395 (1), A173786 (2), A055235 (3), A055236 (4), A055237 (5), A055257 (6), A055258 (7), A055259 (8), A055260 (9), A052216 (10), A073211 (11), A194887 (12), A072390 (13), A055261 (16), A073213 (17), A073215 (23).

Programs

  • Mathematica
    Flatten[Table[Table[19^n + 19^m, {m, 0, n}], {n, 0, 7}]] (* T. D. Noe, Jun 18 2013 *)
    Total/@Tuples[19^Range[0,10],2]//Union (* Harvey P. Dale, Jan 04 2019 *)
  • Python
    from math import isqrt
    def A073214(n): return 19**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+19**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 09 2025

Formula

T(n,m) = 19^n + 19^m for n >= 0 and m in [0..n].
Bivariate g.f.: (2 - 20*x) / ((1 - x) * (1 - 19*x) * (1 - 19*x*y)). - J. Douglas Morrison, Jul 28 2021

A073215 Sum of two powers of 23.

Original entry on oeis.org

2, 24, 46, 530, 552, 1058, 12168, 12190, 12696, 24334, 279842, 279864, 280370, 292008, 559682, 6436344, 6436366, 6436872, 6448510, 6716184, 12872686, 148035890, 148035912, 148036418, 148048056, 148315730, 154472232, 296071778
Offset: 0

Views

Author

Jeremy Gardiner, Jul 20 2002

Keywords

Examples

			T(2,0) = 23^2 + 23^0 = 530.
Table begins:
       2;
      24,     46;
     530,    552,   1058;
   12168,  12190,  12696,  24334;
  279842, 279864, 280370, 292008, 559682;
  ...
		

Crossrefs

Cf. A009967.
Equals twice A072822.
Sums of two powers of n: A073423 (0), A007395 (1), A173786 (2), A055235 (3), A055236 (4), A055237 (5), A055257 (6), A055258 (7), A055259 (8), A055260 (9), A052216 (10), A073211 (11), A194887 (12), A072390 (13), A055261 (16), A073213 (17), A073214 (19).

Programs

  • Mathematica
    With[{nn=30},Take[Union[Total/@Tuples[23^Range[0,nn],2]],nn]] (* Harvey P. Dale, Oct 16 2017 *)
  • Python
    from math import isqrt
    def A073215(n): return 23**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+23**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 09 2025

Formula

T(n, m) = 23^n + 23^m, for n >= 0 and m in [0..n].
Bivariate g.f.: (2 - 24*x) / ((1 - x) * (1 - 23*x) * (1 - 23*x*y)). - J. Douglas Morrison, Jul 29 2021

A325984 Lexicographically earliest sequence of distinct nonnegative terms such that for any n >= 0, the sum of digits of n in base 2 equals the sum of digits of a(n) in base 3.

Original entry on oeis.org

0, 1, 3, 2, 9, 4, 6, 5, 27, 10, 12, 7, 18, 11, 13, 8, 81, 28, 30, 15, 36, 19, 21, 14, 54, 29, 31, 16, 33, 20, 22, 17, 243, 82, 84, 37, 90, 39, 45, 24, 108, 55, 57, 32, 63, 34, 38, 23, 162, 83, 85, 40, 87, 42, 46, 25, 91, 48, 56, 35, 58, 41, 43, 26, 729, 244
Offset: 0

Views

Author

Rémy Sigrist, May 30 2019

Keywords

Comments

This sequence is a permutation of the nonnegative integers, with inverse A325985.
The first known fixed points are: 0, 1, 6 and 129936.
We can generalize this sequence for any pair of bases > 1, say u and v:
- let f_{u,v} be the lexicographically earliest sequence of distinct nonnegative terms such that for any n >= 0, the sum of digits of n in base u equals the sum of digits of f_{u,v}(n) in base v,
- in particular f_{2,3} = a (this sequence) and f_{3,2} = A325985,
- f_{u,v} is a permutation of the nonnegative integers, with inverse f_{v,u},
- f_{u,v}(u^k) = v^k for any k >= 0,
- f_{u,u} is the identity function,
- f_{u,v} o f_{v,w} = f_{u,w} (where o denotes function composition).

Examples

			The first terms, alongside the binary representation of n and the ternary representation of a(n), are:
  n   a(n)  bin(n)  ter(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     3      10         10
   3     2      11          2
   4     9     100        100
   5     4     101         11
   6     6     110         20
   7     5     111         12
   8    27    1000       1000
   9    10    1001        101
  10    12    1010        110
  11     7    1011         21
  12    18    1100        200
  13    11    1101        102
  14    13    1110        111
  15     8    1111         22
  16    81   10000      10000
		

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = Module[{s = DigitCount[n, 2, 1], k = 1}, While[! FreeQ[Array[a, n - 1], k] || Plus @@ IntegerDigits[k, 3] != s, k++]; k]; Array[a, 66, 0] (* Amiram Eldar, Jul 25 2023 *)
  • PARI
    See Links section.

Formula

a(2^k) = 3^k for any k >= 0.
A000120(n) = A053735(a(n)).
a(A018900(k)) = A055235(k-1) for any k > 0.

A102861 Numbers which in base 5 have digit-sum 4.

Original entry on oeis.org

4, 8, 12, 16, 20, 28, 32, 36, 40, 52, 56, 60, 76, 80, 100, 128, 132, 136, 140, 152, 156, 160, 176, 180, 200, 252, 256, 260, 276, 280, 300, 376, 380, 400, 500, 628, 632, 636, 640, 652, 656, 660, 676, 680, 700, 752, 756, 760, 776, 780, 800, 876, 880, 900, 1000
Offset: 1

Views

Author

Sergi Adamchuk (adamchuk(AT)gmail.com), Mar 15 2005

Keywords

Comments

Or, sums of four powers of 5.

Examples

			In base 5 the numbers are 4, 13, 31, 40, 103, 112, 121, 130, 202, 211, 220, 301, 310, 400, 1003, ...
		

Crossrefs

Cf. A055235.

Programs

  • Maple
    for n from 0 to 2500 do if coeff(series(add(x^(5^i),i=0..4)^4,x,2500),x,n)<>0 then printf(`%d,`,n);fi:od:
  • Mathematica
    Select[Range[1000],Total[IntegerDigits[#,5]]==4&] (* Harvey P. Dale, Jul 13 2023 *)

Formula

The author would like a formula for the n-th term.

Extensions

More terms from Joshua Zucker, May 15 2006

A281228 Expansion of (Sum_{k>=0} x^(3^k))^2 [even terms only].

Original entry on oeis.org

0, 1, 2, 1, 0, 2, 2, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 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, 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

Ilya Gutkovskiy, Jan 18 2017

Keywords

Comments

Number of ways to write 2n as an ordered sum of two powers of 3.
First bisection of self-convolution of characteristic function of powers of 3.

Examples

			G.f. = x^2 + 2*x^4 + x^6 + 2*x^10 + 2*x^12 + x^18 + 2*x^28 + 2*x^30 + 2*x^36 + ...
a(2) = 2 because we have [3, 1] and [1, 3].
		

Crossrefs

Programs

  • Mathematica
    Take[CoefficientList[Series[Sum[x^3^k, {k, 0, 15}]^2, {x, 0, 260}], x], {1, -1, 2}]

Formula

G.f.: (Sum_{k>=0} x^(3^k))^2 [even terms only].

A362861 Positive integers n such that 2*n cannot be written as a sum of distinct elements of the set {5^a + 5^b: a,b = 0,1,2,...}.

Original entry on oeis.org

2, 7, 10, 11, 12, 27, 35, 50, 51, 52, 55, 60, 135, 255
Offset: 1

Views

Author

Zhi-Wei Sun, May 05 2023

Keywords

Comments

If a(15) exists, it should be greater than 10290.
Conjecture 1: (i) The current sequence only has the listed 14 terms. Also, each positive even number can be written as a sum of distinct elements of the set {3^a + 3^b: a,b = 0,1,2,...}.
(ii) Each positive even number can be written as a sum of distinct elements of the set {3^a + 7^b: a,b = 0,1,2,...}. Also, any positive even number not equal to 12 can be written as a sum of numbers of the form 3^a + 5^b (a,b >= 0) with no summand dividing another.
Conjecture 2: Let k and m be positive odd numbers greater than one. Then, any sufficiently large even numbers can be written as a sum of distinct elements of the set {k^a + m^b: a,b = 0,1,2,...}.
Conjecture 3: Let k and m be positive odd numbers greater than one. Then, any sufficiently large even numbers can be written as a sum of some numbers of the form k^a + m^b (a,b >= 0) with no summand dividing another.
Clearly, Conjecture 3 is stronger than Conjecture 2.
See also A362743 for similar conjectures.
a(15) >= 10^6. - Martin Ehrenstein, May 16 2023

Examples

			a(1) = 2, since 2*1 = 5^0 + 5^0 but 2*2 cannot be written as a sum of distinct numbers of the form 5^a + 5^b (a,b >= 0).
		

Crossrefs

Showing 1-10 of 12 results. Next