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 117 results. Next

A276623 The infinite trunk of ternary beanstalk: The only infinite sequence such that a(n-1) = a(n) - A053735(a(n)), where A053735(n) = base-3 digit sum of n.

Original entry on oeis.org

0, 2, 4, 8, 10, 12, 16, 20, 26, 28, 30, 34, 38, 42, 46, 52, 56, 62, 68, 72, 80, 82, 84, 88, 92, 96, 100, 106, 110, 116, 122, 126, 134, 140, 144, 152, 160, 164, 170, 176, 180, 188, 194, 198, 204, 212, 216, 224, 232, 242, 244, 246, 250, 254, 258, 262, 268, 272, 278, 284, 288, 296, 302, 306, 314, 322, 326, 332, 338, 342, 350, 356, 360
Offset: 0

Views

Author

Antti Karttunen, Sep 11 2016

Keywords

Crossrefs

Cf. A004128, A024023, A053735, A054861, A261231 (left inverse), A261233, A276622, A276624, A276603 (terms divided by 2), A276604 (first differences).
Cf. A179016, A219648, A219666, A255056, A259934, A276573, A276583, A276613 for similar constructions.
Cf. also A263273.

Programs

Formula

a(n) = A276624(A276622(n)).
Other identities. For all n >= 0:
A261231(a(n)) = n.
a(A261233(n)) = A024023(n) = 3^n - 1.

A286585 a(n) = A053735(A048673(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 31 2017

Keywords

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import factorint, nextprime
    from operator import mul
    def a053735(n): return sum(digits(n, 3)[1:])
    def a048673(n):
        f = factorint(n)
        return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))//2
    def a(n): return a053735(a048673(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 12 2017
  • Scheme
    (define (A286585 n) (A053735 (A048673 n)))
    

Formula

a(n) = A053735(A048673(n)).
For all n >= 0, a(A000079(n)) = n+1.

A173523 1+A053735(n-1), where A053735 is the sum-of-digits function in base 3.

Original entry on oeis.org

1, 2, 3, 2, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6, 5, 6, 7, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6, 5, 6, 7, 6, 7, 8, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6, 5, 6, 7, 6, 7, 8, 5, 6, 7, 6, 7, 8, 7, 8, 9, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6, 5, 6, 7, 6, 7, 8, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6
Offset: 1

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

A053735 can be obtained as 0 followed by the first 2 terms of this sequence, followed by the first 6 terms, followed by the first 18 terms, ..., followed by the first 2*3^n terms, etc.
Similar observations are possible for: A063787 (base-2 case), and generic comments have been gathered in A173525 (base-5 case).
Fixed point of morphism 1->123, 2->234, 3->345 etc. (start with 1).

Examples

			If written as a triangle, begins:
1,
2,3,
2,3,4,3,4,5,
2,3,4,3,4,5,4,5,6,3,4,5,4,5,6,5,6,7,
2,3,4,3,4,5,4,5,6,3,4,5,4,5,6,5,6,7,4,5,6,5,6,7,6,7,8,...
		

Crossrefs

A286632 Base-3 digit sum of A254103: a(n) = A053735(A254103(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 03 2017

Keywords

Comments

Reflecting the structure of A254103 also this sequence can be represented as a binary tree:
0
|
...................1...................
2 1
3......../ \........2 4......../ \........2
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
4 1 3 3 5 3 5 2
5 4 6 3 4 2 4 2 6 2 4 3 6 1 3 4
etc.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a254103(n):
        if n==0: return 0
        if n%2==0: return 3*a254103(n/2) - 1
        else: return floor((3*(1 + a254103((n - 1)/2)))/2)
    def a(n): return sum(digits(a254103(n), 3)[1:]) # Indranil Ghosh, Jun 06 2017
  • Scheme
    (define (A286632 n) (A053735 (A254103 n)))
    

Formula

a(n) = A053735(A254103(n)).
a(n) = A056239(A286633(n)).
For all n >= 0, a(A000079(n)) = n+1.

A231503 a(n) = Sum_{i=0..n} digsum_3(i)^2, where digsum_3(i) = A053735(i).

Original entry on oeis.org

0, 1, 5, 6, 10, 19, 23, 32, 48, 49, 53, 62, 66, 75, 91, 100, 116, 141, 145, 154, 170, 179, 195, 220, 236, 261, 297, 298, 302, 311, 315, 324, 340, 349, 365, 390, 394, 403, 419, 428, 444, 469, 485, 510, 546, 555, 571, 596, 612, 637, 673, 698, 734, 783, 787, 796, 812, 821, 837, 862, 878, 903, 939, 948, 964, 989, 1005, 1030, 1066, 1091, 1127, 1176, 1192, 1217, 1253, 1278
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate @ (Table[Plus @@ IntegerDigits[n, 3], {n, 0, 75}]^2) (* Amiram Eldar, Jan 20 2022 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 3)^2); \\ Michel Marcus, Sep 20 2017

A231504 a(n) = Sum_{i=0..n} digsum_3(i)^3, where digsum_3(i) = A053735(i).

Original entry on oeis.org

0, 1, 9, 10, 18, 45, 53, 80, 144, 145, 153, 180, 188, 215, 279, 306, 370, 495, 503, 530, 594, 621, 685, 810, 874, 999, 1215, 1216, 1224, 1251, 1259, 1286, 1350, 1377, 1441, 1566, 1574, 1601, 1665, 1692, 1756, 1881, 1945, 2070, 2286, 2313, 2377, 2502, 2566, 2691, 2907, 3032, 3248, 3591, 3599, 3626, 3690, 3717, 3781, 3906, 3970, 4095, 4311, 4338, 4402, 4527, 4591, 4716
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate @ Array[(Plus @@ IntegerDigits[#, 3])^3 &, 70, 0] (* Amiram Eldar, Jan 20 2022 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 3)^3); \\ Michel Marcus, Sep 20 2017

A231505 a(n) = Sum_{i=0..n} digsum_3(i)^4, where digsum_3(i) = A053735(i).

Original entry on oeis.org

0, 1, 17, 18, 34, 115, 131, 212, 468, 469, 485, 566, 582, 663, 919, 1000, 1256, 1881, 1897, 1978, 2234, 2315, 2571, 3196, 3452, 4077, 5373, 5374, 5390, 5471, 5487, 5568, 5824, 5905, 6161, 6786, 6802, 6883, 7139, 7220, 7476, 8101, 8357, 8982, 10278, 10359, 10615, 11240, 11496, 12121, 13417, 14042, 15338, 17739, 17755, 17836, 18092, 18173, 18429, 19054, 19310, 19935, 21231
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate @ Array[(Plus @@ IntegerDigits[#, 3])^4 &, 60, 0] (* Amiram Eldar, Jan 20 2022 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 3)^4); \\ Michel Marcus, Sep 20 2017

A358975 Numbers that are coprime to their digital sum in base 3 (A053735).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 49, 51, 53, 55, 59, 61, 67, 69, 71, 73, 79, 81, 83, 85, 89, 91, 97, 101, 103, 107, 109, 113, 119, 121, 123, 125, 127, 129, 131, 137, 139, 141, 143, 147, 149, 151, 153, 155, 157, 159, 161, 163, 167, 169
Offset: 1

Views

Author

Amiram Eldar, Dec 07 2022

Keywords

Comments

Numbers k such that gcd(k, A053735(k)) = 1.
All the terms are odd since if k is even then A053735(k) is even and so gcd(k, A053735(k)) >= 2.
Olivier (1975, 1976) proved that the asymptotic density of this sequence is 4/Pi^2 = 0.40528... (A185199).
The powers of 3 (A000244) are terms. These are also the only ternary Niven numbers (A064150) in this sequence.
Includes all the odd prime numbers (A065091).

Examples

			3 is a term since A053735(3) = 1, and gcd(3, 1) = 1.
		

Crossrefs

Subsequences: A000244, A065091.
Similar sequences: A094387, A339076, A358976, A358977, A358978.

Programs

  • Mathematica
    q[n_] := CoprimeQ[n, Plus @@ IntegerDigits[n, 3]]; Select[Range[200], q]
  • PARI
    is(n) = gcd(n, sumdigits(n, 3)) == 1;

A381838 k/9 is in this list if A053735(k) < A007949(k), i.e. if digitsum(k, 3) < valuation(k, 3).

Original entry on oeis.org

1, 3, 6, 9, 12, 18, 27, 30, 36, 45, 54, 63, 81, 84, 90, 99, 108, 117, 135, 162, 171, 189, 216, 243, 246, 252, 261, 270, 279, 297, 324, 333, 351, 378, 405, 432, 486, 495, 513, 540, 567, 594, 648, 729, 732, 738, 747, 756, 765, 783, 810, 819, 837, 864, 891, 918, 972, 981, 999
Offset: 1

Views

Author

Peter Luschny, Mar 08 2025

Keywords

Crossrefs

Cf. A371176 (base 2), A381837 (base 4), A381836 (base 5).

Programs

  • Maple
    aList := upto -> local k; [seq(k/9, k in select(n -> add(convert(n, base, 3)) < padic[ordp](n, 3), [seq(9..upto,9)]))]: aList(9000);
  • Mathematica
    Select[Range[9000],DigitSum[#,3]Stefano Spezia, Mar 08 2025 *)
  • SageMath
    def aList(upto, b): return [n/b^2 for n in srange(b^2, upto, b^2) if sum(n.digits(b)) < valuation(n, b)]
    print(aList(9000, 3))

A177511 A053735-perfect numbers.

Original entry on oeis.org

3, 26, 62, 74, 77, 133, 134, 143, 155, 161, 185, 203, 206, 209, 215, 218, 319, 323, 341, 386, 398, 458, 473, 542, 545, 551, 554, 562, 565, 581, 589, 611, 614, 629, 635, 662, 671, 695, 698, 703, 706, 707, 713, 718, 721, 889, 899, 913, 959, 965, 998
Offset: 1

Views

Author

Vladimir Shevelev, Dec 11 2010

Keywords

Comments

For definition, see A175522.

Crossrefs

Programs

  • Maple
    A053735 := proc(n) add(d, d=convert(n,base,3)) ;end proc:
    isA177511 := proc(n) local a,d ; a := 0 ; for d in numtheory[divisors](n) minus {n} do a := a+A053735(d) ; end do: a = A053735(n) ;end proc:
    for n from 1 to 1000 do if isA177511(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar
  • PARI
    isok(n) = sumdiv(n, d, (dMichel Marcus, Feb 06 2016
  • Sage
    A053735 = lambda n: sum(n.digits(base=3))
    is_A177511 = lambda n: sum(A053735(d) for d in divisors(n)) == 2*A053735(n)
    # D. S. McNeil, Dec 11 2010
    

Formula

{n : sum_{d|n, dA053735(d) = A053735(n)}.

Extensions

Extended by D. S. McNeil, Dec 11 2010
Showing 1-10 of 117 results. Next