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-4 of 4 results.

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

A276326 Numbers expressed in greedy A001563-base.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 123, 130, 131, 132, 133, 140, 141, 200, 201, 202, 203, 210, 211, 212, 213, 220, 221, 222, 223, 230, 231, 232, 233, 240, 241, 300, 301, 302, 303, 310, 311, 312, 313, 320, 321, 322, 323, 330, 331, 332, 333, 340, 341, 400
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

Terms A001563(1) = 1, A001563(2) = 4, A001563(3) = 18, ... give the base values for the digit positions from 1 onward. Digit places are filled by always trying to find the largest possible term of A001563 that still fits into the sum.
A130744(8) = 3225600 = 10*A001563(8) is the first number which yields an ambiguous representation when expressed in decimal, because in this base it is actually "A0000000" (where digit "A" stands for ten).

Examples

			To recover n from a(n) the digits in positions i = 1, 2, 3, ... (starting indexing from the least significant digit at right) are multiplied by A001563(i) and added together:
  ----------------
   n         a(n)
  ----------------
   0           0
   1           1
   2           2
   3           3
   4          10
   5          11
   6          12
   7          13
   8          20
   9          21
  10          22
  11          23
  12          30
  13          31
  14          32
  15          33
  16          40
  17          41 (as 4*A001563(2) + 1*A001563(1) = 17)
  18         100 (as 1*A001563(3) + 0*A001563(2) + 0*A001563(1) = 18)
and:
3225599 99111111 (as 3225599 = 9*b(8) + 9*b(7) + b(6) + b(5) + b(4) + b(3) + b(2) + b(1)), where b(n) = A001563(n).
		

Crossrefs

Cf. A276327 (the least significant nonzero digit).
Cf. A276328 (the sum of digits).
Cf. A276333 (the most significant digit).
Cf. A276336 (a largest digit).
Cf. A276337 (number of nonzero digits).
Cf. A033312 (repunits).
Cf. A276091 (no digits larger than one).
Differs from A007090 for the first time at n=16 and from A055655 at n=18.

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]]]; Table[FromDigits@ f@ n, {n, 72}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276326 n) (let loop ((n n) (s 0)) (if (zero? n) s (let ((dig (A276333 n))) (if (> dig 9) (error "A276326: ambiguous representation of n, digit > 9 would be needed: " n dig) (loop (A276335 n) (+ s (* dig (expt 10 (- (A258198 n) 1))))))))))

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.
Showing 1-4 of 4 results.