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.

Previous Showing 11-13 of 13 results.

A339012 Written in factorial base, n ends in a(n) consecutive non-0 digits.

Original entry on oeis.org

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

Views

Author

Kevin Ryde, Nov 19 2020

Keywords

Comments

Also, a(n) is the least p for which n mod (p+2)! < (p+1)!. A small remainder like this means a 0 digit at position p in the factorial base representation of n, where the least significant digit is position p=0. The least such p means only nonzero digits below.
Those n with a(n)=p are characterized by remainders n mod (p+2)!, per the formula below. These remainders are terms of A227157 which is factorial base digits all nonzero. A227157 can be taken by rows where row p lists the terms having p digits in factorial base. Each digit ranges from 1 up to 1,2,3,... respectively so there are p! values in a row, and so the asymptotic density of terms p here is p!/(p+2)! = 1/((p+2)*(p+1)) = 1/A002378(p+1) = 1/2, 1/6, etc.
The smallest n with a(n)=p is the factorial base repunit n = 11..11 with p 1's = A007489(p).

Examples

			n = 10571 written in factorial base is 2,0,4,0,1,2,1.  It ends in 3 consecutive nonzero digits (1,2,1) so a(10571) = 3.  Remainder 10571 mod (3+2)! = 11 is in A227157 row 3.
		

Crossrefs

Cf. A108731 (factorial base digits), A016921 (where a(n)=1), A339013 (+2), A230403 (ending 0's).
In other bases: A215887, A328570.

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r}, While[{k, r} = QuotientRemainder[k, m]; r != 0, m++]; m - 2]; Array[a, 30, 0] (* Amiram Eldar, Feb 15 2021 after Kevin Ryde's PARI code *)
  • PARI
    a(n) = my(b=2,r); while([n,r]=divrem(n,b);r!=0, b++); b-2;

Formula

a(n)=p iff n mod (p+2)! is a term in row p of A227157 (row p terms having p digits), including p=0 by reckoning an initial A227157(0) = 0 as no digits.
a(n)=0 iff n mod 2 = 0.
a(n)=1 iff n mod 6 = 1, which is A016921.
a(n)=2 iff n mod 24 = 3 or 5.

A233286 Number of trailing zeros in the factorial base representation of n-th Fibonacci number.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 07 2013

Keywords

Comments

A233285 is the main entry for this topic, see comments there.

Examples

			The factorial base representation (A007623(A000045(n))) of Fibonacci numbers look like this, from n=1 onward: 1, 1, 10, 11, 21, 110, 201, 311, 1120, 2101, 3221, 11000, 14221, 30221, 50120, 121011, 211201, 332220, ...
When we count the trailing zeros of each, we get 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, ..., the first terms of this sequence.
		

Crossrefs

One less than A233285. Cf. also A007623, A000045, A230403.

Programs

Formula

a(n) = A230403(A000045(n)) = A233285(n)-1.

Extensions

Data section extended to a(105) by Antti Karttunen, Jan 18 2025

A352427 a(n) is the number of trailing 0's in the minimal representation of n in terms of the positive Pell numbers (A317204).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 16 2022

Keywords

Comments

The asymptotic density of the occurrences of 0 is sqrt(2)-1 and of the occurrences of k = 1, 2, ... is 2*(sqrt(2)-1)^(k+1).
The asymptotic mean of this sequence is 1 and its asymptotic variance is sqrt(2).

Crossrefs

Similar sequences: A003849 (dual Zeckendorf), A035614 (Zeckendorf), A230403 (factorial), A276084 (primorial), A278045 (tribonacci).

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; IntegerExponent[Total[3^(s - 1)], 3]]; Array[a, 100]

Formula

a(A000129(n)) = n-1 for n>=1.
a(n) = 0 if and only if n is in A286666.
a(n) > 0 if and only if n is in A286667.
a(n) == 0 (mod 2) if and only if n is in A003152.
a(n) == 1 (mod 2) if and only if n is in A003151.
Previous Showing 11-13 of 13 results.