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

A276091 Numbers obtained by reinterpreting base-2 representation of n in A001563-base (A276326): a(n) = Sum_{k>=0} A030308(n,k)*A001563(k+1).

Original entry on oeis.org

0, 1, 4, 5, 18, 19, 22, 23, 96, 97, 100, 101, 114, 115, 118, 119, 600, 601, 604, 605, 618, 619, 622, 623, 696, 697, 700, 701, 714, 715, 718, 719, 4320, 4321, 4324, 4325, 4338, 4339, 4342, 4343, 4416, 4417, 4420, 4421, 4434, 4435, 4438, 4439, 4920, 4921, 4924, 4925, 4938, 4939, 4942, 4943, 5016, 5017, 5020, 5021, 5034, 5035, 5038, 5039, 35280, 35281
Offset: 0

Views

Author

Antti Karttunen, Aug 19 2016

Keywords

Comments

Numbers that are sums of distinct terms of A001563.
A number is included if and only if all the nonzero digits in its factorial base representation (A007623) are maximal allowed in those digit positions, thus this sequence gives all numbers n for which A060130(n) = A260736(n).
Numbers n for which A276328(n) = A276337(n), thus from 1 onward the positions of ones in A276336.
Conjectured also to give all numbers n for which A255411(n) = A276340(n) (thus zeros of A276339).

Crossrefs

Programs

  • Mathematica
    Table[Total[Times @@@ Transpose@ {Map[# #! &, Range@ Length@ #], Reverse@ #}] &@ IntegerDigits[n, 2], {n, 64}] (* Michael De Vlieger, Aug 31 2016 *)
  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n

    0 else '0' for i in x)[::-1] return 0 if n==0 else sum(int(y[i])*f(i + 1) for i in range(len(y))) def a(n): return 0 if n==0 else a255411(a(n//2)) if n%2==0 else 1 + a255411(a((n - 1)//2)) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017

  • Scheme
    ;; This is a standalone program:
    (define (A276091 n) (let loop ((n n) (s 0) (f 1) (i 2)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) s (* i f) (+ 1 i))) (else (loop (/ (- n 1) 2) (+ s (* (- i 1) f)) (* i f) (+ 1 i))))))
    ;; This implements one of the given recurrences:
    (definec (A276091 n) (cond ((zero? n) n) ((even? n) (A255411 (A276091 (/ n 2)))) (else (+ 1 (A255411 (A276091 (/ (- n 1) 2)))))))
    ;; Alternatively, we can use A276340 in place of A255411:
    (definec (A276091 n) (cond ((zero? n) n) ((even? n) (A276340 (A276091 (/ n 2)))) (else (+ 1 (A276340 (A276091 (/ (- n 1) 2)))))))
    

Formula

a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A255411(a(n)).
a(0) = 0, a(2n) = A276340(a(n)), a(2n+1) = 1+A276340(a(n)).
Other identities. For all n >= 0:
a(n) = A225901(A059590(n)).
a(n) = A276090(A275959(n)).
A276328(a(n)) = A276337(a(n)) = A000120(n).

Extensions

Name changed (to emphasize the functional nature of the sequence) with the original definition moved to the comments by Antti Karttunen, Sep 01 2016

A276335 Discard the most significant digit when n is expressed in greedy A001563-base (A276326), then convert back to decimal: a(n) = n - A276334(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    {0}~Join~Table[n - # Floor[n/#] &@(# #!) &@ NestWhile[# + 1 &, 0, # #! <= n &[# + 1] &], {n, 96}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276335 n) (- n (A276334 n)))

Formula

a(n) = n - A276334(n).

A276328 Digit sum when n is expressed in greedy A001563-base (A276326).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

a(n) is the number of terms of A001563 needed to sum to n using the greedy algorithm.
This seems to give also the minimal number of terms of A001563 that sum to n (checked empirically up to n=3265920), but it would be nice to know for sure whether this holds for all n.

Examples

			For n=1, the largest term of A001563 <= 1 is A001563(1) = 1, thus a(1) = 1.
For n=2, the largest term of A001563 <= 2 is A001563(1) = 1, thus a(2) = 1 + a(2-1) = 2.
For n=18, the largest term of A001563 <= 18 is A001563(3) = 18, thus a(18) = 1.
For n=20, the largest term of A001563 <= 20 is A001563(3) = 18, thus a(20) = 1 + a(20-18) = 3.
For n=36, the largest term of A001563 <= 36 is A001563(3) = 18, thus a(36) = 1 + a(18) = 2.
		

Crossrefs

Cf. A276091 (gives all n for which a(n) = A276337(n)).
Cf. also A007895, A034968, A265744, A265745 for similar sequences.

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Total@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(n-A258199(n)).
a(0) = 0; for n >= 1, a(n) = A276333(n) + a(A276335(n)).
Other identities and observations. For all n >= 0:
a(A276091(n)) = A000120(n).
a(n) >= A276337(n).
It also seems that a(n) <= A276332(n) for all n.

A276333 The most significant digit in greedy A001563-base (A276326): a(n) = floor(n/A258199(n)), a(0) = 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[n/(# #!)] &@ NestWhile[# + 1 &, 0, # #! <= n &[# + 1] &], {n, 96}] (* or *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@#, Last@#} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[First@ f@ n, {n, 96}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276333 n) (if (zero? n) n (floor->exact (/ n (A258199 n)))))

Formula

a(0) = 0; for n >= 1, a(n) = floor(n/A258199(n)).

A276337 Number of nonzero digits in greedy A001563-base representation of n (A276326).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 4, 4
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Count[f@ n, d_ /; d > 0], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(A276335(n)).
For all n >= 0, a(n) <= A276328(n).

A276340 Shift left the greedy A001563-base (A276326) representation of n (append 0 to the right, then convert back to decimal).

Original entry on oeis.org

0, 4, 8, 12, 18, 22, 26, 30, 36, 40, 44, 48, 54, 58, 62, 66, 72, 76, 96, 100, 104, 108, 114, 118, 122, 126, 132, 136, 140, 144, 150, 154, 158, 162, 168, 172, 192, 196, 200, 204, 210, 214, 218, 222, 228, 232, 236, 240, 246, 250, 254, 258, 264, 268, 288, 292, 296, 300, 306, 310, 314, 318, 324, 328, 332, 336, 342, 346, 350, 354, 360
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2016

Keywords

Examples

			   n   A276326  with one zero           converted back
                appended to the right   to decimal = a(n)
---------------------------------------------------------
   0       0            00                     0
   1       1            10                     4
   2       2            20                     8
   3       3            30                    12
   4      10           100                    18
   5      11           110                    22
   6      12           120                    26
   7      13           130                    30
   8      20           200                    36
   9      21           210                    40
  10      22           220                    44
  11      23           230                    48
  12      30           300                    54
  13      31           310                    58
  14      32           320                    62
  15      33           330                    66
  16      40           400                    72
  17      41           410                    76
  18     100          1000                    96
		

Crossrefs

Cf. A276341 (complement).
Cf. also A153880, A255411, A276091.

Programs

Formula

a(0) = 0; for n >= 1, a(n) = A276338(n) + a(A276335(n)).
Other identities:
a(A001563(n)) = A001563(n+1) for all n >= 1.

A276336 The largest digit used when n is written in greedy A001563-base (A276326).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

After a(1) = 1 and a(2) = 2, the records occur at positions given by A130744, so that each n >= 3 occurs for the first time at A130744(n-2). This holds because A001563(n) = (n*n!) < A130744(n) = (n+2)*(n*n!) < (n+1)*(n+1)! = A001563(n+1).
First term > 9 occurs thus at A130744(8) = 3225600 with a(3225600)=10.

Crossrefs

Cf. A276091 (indices of terms <= 1).

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Max@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = max(A276333(n), a(A276335(n))).

A276327 The least significant nonzero digit in greedy A001563-base (A276326), a(0) = 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]];
    {0}~Join~Table[Last@ DeleteCases[f@ n, d_ /; d == 0], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, if A276335(n) = 0 then a(n) = A276333(n), otherwise a(n) = a(A276335(n)).

A276334 a(n) = A258199(n) * A276333(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 72, 72, 72, 72, 72, 72, 72, 72
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

a(n) is obtained by first replacing with zeros all other digits except the leftmost (the most significant) in the greedy A001563-base representation of n (A276326), then converting back to decimal. Used to compute A276335.

Crossrefs

Programs

Formula

a(n) = A258199(n) * A276333(n).
A276335(n) = n - a(n).

A276338 a(n) = A276333(n) * A001563(1+A258198(n)).

Original entry on oeis.org

0, 4, 8, 12, 18, 18, 18, 18, 36, 36, 36, 36, 54, 54, 54, 54, 72, 72, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 384
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2016

Keywords

Comments

a(n) is obtained by first replacing with zeros all other digits except the leftmost (the most significant) in the greedy A001563-base representation of n (A276326), then appending an extra zero to the right, then converting back to decimal.
An auxiliary function for computing A276340.

Crossrefs

Programs

Formula

a(n) = A276333(n) * A001563(1+A258198(n)).
Other identities. For all n >= 0:
a(n) = A276340(A276334(n)).
Showing 1-10 of 11 results. Next