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

A364123 Stolarsky-Niven numbers: numbers that are divisible by the number of 1's in their Stolarsky representation (A364121).

Original entry on oeis.org

2, 4, 6, 8, 9, 12, 14, 16, 20, 22, 24, 27, 30, 36, 38, 40, 42, 44, 48, 54, 56, 57, 60, 65, 69, 72, 75, 80, 84, 85, 90, 92, 96, 98, 100, 102, 104, 108, 112, 116, 120, 124, 126, 132, 136, 138, 145, 147, 150, 153, 155, 159, 160, 175, 180, 185, 190, 195, 196, 205
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2023

Keywords

Comments

Numbers k such that A200649(k) | k.
Fibonacci(k) + 1 is a term if k !== 3 (mod 6) (i.e., k is in A047263).

Examples

			4 is a term since its Stolarsky representation, A364121(4) = 10, has one 1 and 4 is divisible by 1.
6 is a term since its Stolarsky representation, A364121(6) = 101, has 2 1's and 6 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
    stolNivQ[n_] := n > 1 && Divisible[n, Total[stol[n]]];
    Select[Range[200], stolNivQ]
  • PARI
    stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1])));}
    isA364123(n) = n > 1 && !(n % vecsum(stol(n)));

A364122 Numbers whose Stolarsky representation (A364121) is palindromic.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 13, 15, 18, 21, 23, 34, 36, 40, 45, 50, 55, 66, 71, 89, 91, 95, 108, 113, 120, 128, 136, 144, 159, 176, 196, 204, 233, 235, 239, 261, 273, 286, 291, 298, 319, 327, 338, 351, 364, 377, 400, 426, 464, 490, 518, 550, 563, 610, 612, 616, 654, 667
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2023

Keywords

Comments

The positive Fibonacci numbers (A000045) are terms since the Stolarsky representation of Fibonacci(1) = Fibonacci(2) is 0 and the Stolarsky representation of Fibonacci(n) is n-2 1's for n >= 3.
Fiboancci(2*n+1) + 2 is a term for n >= 3, since its Stolarsky representation is n-1 0's between two 1's.

Examples

			The first 10 terms are:
   n  a(n)  A364121(a(n))
  --  ----  -------------
   1     1  0
   2     2  1
   3     3  11
   4     5  111
   5     6  101
   6     8  1111
   7    13  11111
   8    15  1001
   9    18  11011
  10    21  111111
		

Crossrefs

Programs

  • Mathematica
    stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
    stolPalQ[n_]:= PalindromeQ[stol[n]]; Select[Range[700], stolPalQ]
  • PARI
    stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1])));}
    is(n) = {my(s = stol(n)); s == Vecrev(s);}

A364127 The number of trailing 0's in the Stolarsky representation of n (A364121).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jul 07 2023

Keywords

Comments

The first position of k = 2, 3, 4, ... is A055588(k+1).
The asymptotic density of the occurrences of k = 0, 1, 2, ... is (2-phi)^k/phi, where phi is the golden ratio (A001622).
The asymptotic mean of this sequence is phi - 1 (A094214) and the asymptotic standard deviation is 1.

Crossrefs

Programs

  • Mathematica
    stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
    a[n_] := IntegerExponent[FromDigits[stol[n]], 10]; Array[a, 100, 2]
  • PARI
    stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1])));}
    a(n) = valuation(fromdigits(stol(n)), 10);

Formula

a(n) = A122840(A364121(n)).
Showing 1-3 of 3 results.