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

A173524 a(n) = A053737(4^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053737.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

It appears that if A053737 is written as a triangle then the rows are initial segments of the present sequence; see the conjecture in A000120.
The comments in A173525 (base b=5 there) apply here with base b=4. The base b=3 is considered in A173523.

Crossrefs

Programs

  • Maple
    A053737 := proc(n) add(d, d=convert(n,base,4)) ; end proc:
    A173524 := proc(n) local b; b := 4 ; if n < b then n; else k := n/(b-1); k := ceil(log(k)/log(b)) ; A053737(b^k+n-1) ; end if; end proc:
    seq(A173524(n),n=1..100) ; # R. J. Mathar, Dec 09 2010

Formula

a(n) = A053737(4^k+n-1) where k >= ceiling(log_4(n/3)). [R. J. Mathar, Dec 09 2010]
Conjecture: Fixed point of the morphism 1->{1,2,3,...,b}, 2->{2,3,4,...,b+1}, j->{j,j+1,...,j+b-1} for b=4. [Joerg Arndt, Dec 08 2010]

A231664 a(n) = Sum_{i=0..n} digsum_4(i), where digsum_4(i) = A053737(i).

Original entry on oeis.org

0, 1, 3, 6, 7, 9, 12, 16, 18, 21, 25, 30, 33, 37, 42, 48, 49, 51, 54, 58, 60, 63, 67, 72, 75, 79, 84, 90, 94, 99, 105, 112, 114, 117, 121, 126, 129, 133, 138, 144, 148, 153, 159, 166, 171, 177, 184, 192, 195, 199, 204, 210, 214, 219, 225, 232, 237, 243, 250, 258, 264, 271, 279, 288, 289, 291, 294, 298, 300, 303, 307, 312, 315, 319, 324, 330, 334, 339, 345, 352, 354, 357
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 94.

Crossrefs

Programs

  • Magma
    [(&+[&+Intseq(j, 4): j in [0..n]]): n in [0..100]]; // G. C. Greubel, Feb 16 2019
  • Maple
    ListTools:-PartialSums([seq(convert(convert(n,base,4),`+`), n=0..200)]); # Robert Israel, Sep 20 2017
  • Mathematica
    Table[Sum[Total[IntegerDigits[j, 4]], {j,0,n}], {n, 0, 100}] (* G. C. Greubel, Feb 16 2019 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 4)); \\ Michel Marcus, Sep 20 2017
    

Formula

G.f.: g(x) satisfies g(x) = (1+x+x^2+x^3)^2*g(x^4) + (x+2*x^2+3*x^3)/(1-x-x^4+x^5). - Robert Israel, Sep 20 2017
a(n) ~ 3*n*log(n)/(4*log(2)). - Amiram Eldar, Dec 09 2021

A231667 a(n) = Sum_{i=0..n} digsum_4(i)^4, where digsum_4(i) = A053737(i).

Original entry on oeis.org

0, 1, 17, 98, 99, 115, 196, 452, 468, 549, 805, 1430, 1511, 1767, 2392, 3688, 3689, 3705, 3786, 4042, 4058, 4139, 4395, 5020, 5101, 5357, 5982, 7278, 7534, 8159, 9455, 11856, 11872, 11953, 12209, 12834, 12915, 13171, 13796, 15092, 15348, 15973, 17269, 19670, 20295, 21591, 23992, 28088, 28169, 28425, 29050, 30346, 30602, 31227, 32523, 34924, 35549, 36845, 39246, 43342
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 4)^4); \\ Michel Marcus, Sep 20 2017

A231665 a(n) = Sum_{i=0..n} digsum_4(i)^2, where digsum_4(i) = A053737(i).

Original entry on oeis.org

0, 1, 5, 14, 15, 19, 28, 44, 48, 57, 73, 98, 107, 123, 148, 184, 185, 189, 198, 214, 218, 227, 243, 268, 277, 293, 318, 354, 370, 395, 431, 480, 484, 493, 509, 534, 543, 559, 584, 620, 636, 661, 697, 746, 771, 807, 856, 920, 929, 945, 970, 1006, 1022, 1047, 1083, 1132, 1157, 1193, 1242, 1306, 1342, 1391, 1455, 1536, 1537, 1541, 1550, 1566, 1570, 1579, 1595, 1620, 1629
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • MATLAB
    for u=0:2000; v(u+1)=sum(dec2base(u,4)-'0');end
    sol=cumsum(v.^2); % Marius A. Burtea, Jan 18 2019
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 4)^2); \\ Michel Marcus, Sep 20 2017
    

A231666 a(n) = Sum_{i=0..n} digsum_4(i)^3, where digsum_4(i) = A053737(i).

Original entry on oeis.org

0, 1, 9, 36, 37, 45, 72, 136, 144, 171, 235, 360, 387, 451, 576, 792, 793, 801, 828, 892, 900, 927, 991, 1116, 1143, 1207, 1332, 1548, 1612, 1737, 1953, 2296, 2304, 2331, 2395, 2520, 2547, 2611, 2736, 2952, 3016, 3141, 3357, 3700, 3825, 4041, 4384, 4896, 4923, 4987, 5112, 5328, 5392, 5517, 5733, 6076, 6201, 6417, 6760, 7272, 7488, 7831, 8343, 9072, 9073, 9081, 9108, 9172
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • MATLAB
    for u=0:2000; v(u+1)=sum(dec2base(u,4)-'0'); end
    sol=cumsum(v.^3); % Marius A. Burtea, Jan 18 2019
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 4)^3); \\ Michel Marcus, Sep 20 2017
    

A194973 Fractalization of (A053737(n+4)), n>=0.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. The sequence (A053737(n+4)), n>=0 is formed by concatenating 4-tuples of the form (n,n+1,n+2, n+3) for n>=1: 1,2,3,4,2,3,4,5,3,4,5,6,...

Crossrefs

Programs

  • Mathematica
    p[n_] := Floor[(n + 3)/4] + Mod[n - 1, 4]
    Table[p[n], {n, 1, 90}]  (* A053737(n+4), n>=0 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20]  (* A194973 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A194974 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]]  (* A194975 *)

A381837 k/16 is in this list if A053737(k) < A235127(k), i.e. if digitsum(k, 4) < valuation(k, 4).

Original entry on oeis.org

1, 4, 8, 16, 20, 32, 48, 64, 68, 80, 96, 128, 144, 192, 256, 260, 272, 288, 320, 336, 384, 448, 512, 528, 576, 640, 768, 832, 1024, 1028, 1040, 1056, 1088, 1104, 1152, 1216, 1280, 1296, 1344, 1408, 1536, 1600, 1792, 2048, 2064, 2112, 2176, 2304, 2368, 2560, 2816
Offset: 1

Views

Author

Peter Luschny, Mar 08 2025

Keywords

Crossrefs

Cf. A371176 (base 2), A381838 (base 3), A381836 (base 5).

Programs

  • Maple
    aList := upto -> local k; [seq(k/16, k in select(n -> add(convert(n, base, 4)) < padic[ordp](n, 4), [seq(16..upto,16)]))]: aList(46000);
  • Mathematica
    Select[Range[46000],DigitSum[#,4]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(46000, 4))

A218085 Let S_5(x) denote the difference in counts of multiples of 5 in the interval [0,x), those with even digit sums in base 4 in one set, those with odd digit sums in base 4 in the other. Then a(n) = (-1)^s_4(n) *(S_5(n) -10*S_5(floor(n/16)) +5*S_5(floor(n/256))), where s_4(n) = A053737(n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The sequence S_5(n) starts 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, ... for n >= 0. Apart from the initial 0, these are blocks of 5 repetitions of 1, 2, 3, 4, 5, 6, 7, 6, 7, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13, 14, ...
Theorem. The sequence is periodic with period 2560.
The theorem allows us to write a recursion for S_5(n), considering n modulo 2560: S_5(n) = 10*S_5(floor(n/16)) - 5*S_5(floor(n/256)) + (-1)^s_4(n)*a(n).

Examples

			a(n)=-9 for n=2411, 2412, 2414, 2491, 2492, 2494 (mod 2560);
a(n)=9 for n=2413, 2415, 2493, 2495 (mod 2560).
		

Crossrefs

Programs

  • Maple
    S := proc(n,j,x)
        a := 0 ;
        for r from j to x-1 by n do
            add(d,d=convert(r,base,n-1)) ;
            a := a+(-1)^% ;
        end do:
        a ;
    end proc:
    A218085 := proc(n)
        S(5,0,n)-10*S(5,0,floor(n/16))+5*S(5,0,floor(n/256)) ;
        %*(-1)^A053737(n) ;
    end proc:
    seq(A218085(n),n=0..80) ; # R. J. Mathar, Oct 31 2012

Formula

-9 <= a(n) <= 9, all 19 values are actually achieved.

A374056 a(n) = max_{i=0..n} S_4(i) + S_4(n-i) where S_4(x) = A053737(x) is the base-4 digit sum of x.

Original entry on oeis.org

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

Views

Author

Hermann Gruber, Jun 26 2024

Keywords

Comments

As shown in the proof of [Gruber and Holzer, lemma 9], the maximum is attained by choosing i as the largest number not exceeding n whose ternary representation is (33...3)_4. Also by lemma 6, for this choice of i we have A053737(i) = 3*floor(log_4(n+1)) and A053737(n-i) = A053737(n+1)-1, giving the formula below.

Examples

			For n=74, the maximum is attained by 63 + 11 = (333)_4 + (23)_4. Using 75=(1023)_4, comparing with the formula above, A053737(63) = 3*floor(log_4(n+1)) = 9 and A053737(11) = A053737(74+1)-1 = 5. Notice that other pairs attain the maximum as well. Namely, 43 + 31 = (223)_4 + (133)_4, as well as 47 + 27 = (233)_4 + (123)_4, and 59 + 15 = (323)_4 + (33)_4.
		

References

  • Hermann Gruber and Markus Holzer, Optimal Regular Expressions for Palindromes of Given Length. Extended journal version, in preparation, 2024.

Crossrefs

Programs

  • Mathematica
    Table[3*Floor[Log[4, k]] + DigitSum[k, 4] - 1, {k, 100}] (* Paolo Xausa, Aug 01 2024 *)
  • PARI
    a(n) = 3*logint(n+1, 4) + sumdigits(n+1, 4) - 1;

Formula

a(n) = 3*floor(log_4(n+1)) + A053737(n+1) - 1 [Gruber and Holzer, lemma 9].

A381834 k/16 is in this list if k > 4 and A053737(k) = A235127(k), i.e. if digitsum(k, 4) = valuation(k, 4).

Original entry on oeis.org

2, 5, 12, 17, 24, 36, 65, 72, 84, 112, 132, 160, 208, 257, 264, 276, 304, 324, 352, 400, 516, 544, 592, 704, 784, 896, 1025, 1032, 1044, 1072, 1092, 1120, 1168, 1284, 1312, 1360, 1472, 1552, 1664, 1856, 2052, 2080, 2128, 2240, 2320, 2432, 2624, 3088, 3200, 3392
Offset: 1

Views

Author

Peter Luschny, Mar 09 2025

Keywords

Crossrefs

Cf. A381835 (base = 3), A381833 (base = 5).

Programs

  • Mathematica
    Select[Range[16, 60000, 16], DigitSum[#, 4] == IntegerExponent[#, 4] &] / 16
Showing 1-10 of 51 results. Next