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

A381581 Numbers divisible by the sum of the digits in their Chung-Graham representation (A381579).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 20, 21, 22, 24, 27, 28, 30, 40, 42, 44, 45, 48, 55, 56, 57, 58, 60, 66, 70, 72, 75, 76, 80, 84, 90, 92, 95, 96, 100, 102, 110, 111, 112, 115, 116, 120, 132, 135, 138, 140, 144, 150, 152, 153, 156, 168, 170, 175, 176, 180, 186, 190, 195, 198
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

Numbers k such that A291711(k) divides k.
Analogous to Niven numbers (A005349) with the Chung-Graham representation (A381579) instead of the decimal representation.
A001906(k) = Fibonacci(2*k) is a term for all k >= 1.
If k is not divisible by 3 (A001651), then Fibonacci(2*k) + 1 is a term.

Examples

			4 is a term since A291711(4) = 1 divides 4.
6 is a term since A291711(6) = 2 divides 6.
		

Crossrefs

Subsequences: A381582, A381583, A381584, A381585.
Similar sequences: A005349, A049445, A064150, A328208, A328212.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; q[n_] := Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2; m -= 2*f[k], s++; m -= f[k]]]; Divisible[n, s]]; Select[Range[200], q]
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    isok(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2; m -= 2*f(k), s++; m -= f(k))); !(n % s);}

A381580 Numbers whose Chung-Graham representation (A381579) is palindromic.

Original entry on oeis.org

0, 1, 2, 4, 9, 12, 15, 18, 22, 33, 44, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 145, 174, 203, 232, 261, 290, 319, 348, 378, 399, 420, 441, 462, 483, 504, 525, 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, 798, 819, 840, 861, 882, 903, 924, 945, 966, 988
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

The numbers of the form Fibonacci(2*k) + 1 (A055588) are all terms since A381579(A055588(0)) = 1, A381579(A055588(1)) = 2, and A381579(A055588(k)) = 10^(k-1)+1 (i.e., two 1's with k-2 0's between them) for k >= 2.

Examples

			The first 10 terms are:
   n  a(n) A381579(a(n))
   ---------------------
   1   0               0
   2   1               1
   3   2               2
   4   4              11
   5   9             101
   6  12             111
   7  15             121
   8  18             202
   9  22            1001
  10  33            1111
		

Crossrefs

Subsequence: A055588.
Similar sequences: A002113, A006995, A094202, A331191.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; q[n_] := Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2*10^(k-1); m -= 2*f[k], s += 10^(k-1); m -= f[k]]]; PalindromeQ[s]]; Select[Range[0, 1000], q]
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    isok(n) = {my(s = 0, m = n, k, d); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2*10^(k-1); m -= 2*f(k), s += 10^(k-1); m -= f(k))); d = digits(s); Vecrev(d) == d;}

A291711 The minimum number of coins needed to pay for n units in the currency system of values 1, 3, 8, 21, 55, 144, ..., Fibonacci(2k), ...

Original entry on oeis.org

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

Views

Author

Yuriko Suwa, Aug 30 2017

Keywords

Comments

It has been proved that there is a unique way to pay any price n with a(n) coins having values of the form Fibonacci(2k).

Examples

			a(7) = 3 because 7 = 3 + 3 + 1 is a minimal sum using 3 coins.
		

Crossrefs

Cf. A007895 (for Fibonacci(k)), A245588 (for Fibonacci(2k-1)), A007953, A381579.

Programs

  • Maple
    x1:=1: x2:=3: L:=[x1,x2]: nn:=12: LS:=[]: for k from 1 to nn-2 do:z:=3*x2-x1: L:=[op(L),z]: x1:=x2: x2:=z: od:
    for n from 1 to 200 do: m:=n: ct:=0: for s from 1 to nn while m>0 do:
    for j from 1 to nn-1 do:if m n then
                return i-1 ;
            end if;
        end do:
    end proc:
    A291711 := proc(n)
        local fibm,gf,e,gfe ;
        fibm := fibIdx(n) ;
        gf := add( x^combinat[fibonacci](2*m),m=1..fibm/2) ;
        gfe := gf ;
        for e from 1 do
            expand(coeftayl(gfe,x=0,n)) ;
            if % > 0 then
                return e ;
            end if;
            gfe := expand(gfe*gf) ;
        end do:
    end proc:
    seq(A291711(n),n=1..100) ; # R. J. Mathar, Nov 11 2017
  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; a[n_] := Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2; m -= 2*f[k], s++; m -= f[k]]]; s]; Array[a, 100] (* Amiram Eldar, Feb 28 2025 *)
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    a(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2; m -= 2*f(k), s++; m -= f(k))); s;} \\ Amiram Eldar, Feb 28 2025

Formula

a(n) = A007953(A381579(n)). - Amiram Eldar, Feb 28 2025

A381607 For any nonnegative integer n with ternary expansion Sum_{k >= 0} t_k * 3^k, a(n) = Sum_{k >= 0} t_k * A000045(2*k + 2).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54
Offset: 0

Views

Author

Rémy Sigrist, Mar 01 2025

Keywords

Comments

Every nonnegative integer appears in the sequence, a finite number of times.

Examples

			42 = 3^3 + 3^2 + 2*3^1, so a(42) = A000045(8) + A000045(6) + 2*A000045(4) = 21 + 8 + 2*3 = 35.
		

Crossrefs

See A022290 for a similar sequence.

Programs

  • PARI
    a(n) = { my (t = Vecrev(digits(n, 3))); sum(k = 1, #t, t[k] * fibonacci(2*k)); }

Formula

a(A028898(A381579(n))) = n.

A381608 Nonnegative integers whose ternary expansion does not contain pairs of 2's only separated by (zero or more) 1's, with offset 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93
Offset: 0

Views

Author

Rémy Sigrist, Mar 01 2025

Keywords

Comments

The ternary expansion of a(n) equals the decimal expansion of A381579(n).

Examples

			The ternary expansion of 20, "211", has no pairs of 2's, so 20 belongs to the sequence.The ternary expansion of 21, "212", has a pair of 2s only separated by 1's, so 21 does not belong to the sequence.
		

Crossrefs

Programs

  • PARI
    a(n) = { for (k = 1, oo, my (f = fibonacci(2*k)); if (f >= n, my (v = 0); while (n, while (n >= f, n -= f; v += 3^(k-1);); f = fibonacci(2*k--);); return (v););); }

Formula

a(n) = A028898(A381579(n)).
A381607(a(n)) = n.

A381609 a(n) is the number of occurrences of n in A381607.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 01 2025

Keywords

Comments

All terms are positive (see A381579).

Examples

			The number 8 appears twice in A381607, so a(8) = 2.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(n) > 0.

A381618 Reverse the Chung-Graham representation of n while preserving its trailing zeros: a(n) = A381607(A263273(A381608(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 17, 11, 12, 20, 19, 15, 16, 10, 18, 14, 13, 21, 22, 43, 24, 30, 51, 45, 38, 29, 25, 46, 32, 33, 54, 53, 41, 50, 28, 49, 40, 36, 42, 23, 44, 27, 31, 52, 48, 39, 37, 26, 47, 35, 34, 55, 56, 111, 58, 77, 132, 113, 98, 63, 64, 119, 79
Offset: 0

Views

Author

Rémy Sigrist, Mar 02 2025

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			The first terms, alongside their Chung-Graham representation, are:
  n   a(n)  A381579(n)  A381579(a(n))
  --  ----  ----------  -------------
   0     0           0              0
   1     1           1              1
   2     2           2              2
   3     3          10             10
   4     4          11             11
   5     7          12             21
   6     6          20             20
   7     5          21             12
   8     8         100            100
   9     9         101            101
  10    17         102            201
  11    11         110            110
  12    12         111            111
  13    20         112            211
  14    19         120            210
  15    15         121            121
  16    16         200            200
		

Crossrefs

See A345201 for a similar sequence.

Programs

  • PARI
    A381607(n) = { my (t = Vecrev(digits(n, 3))); sum(k = 1, #t, t[k] * fibonacci(2*k)); }
    A263273(n) = { my (t = 3^if (n, valuation(n, 3), 0)); t * fromdigits(Vecrev(digits(n / t, 3)), 3) }
    A381608(n) = { for (k = 1, oo, my (f = fibonacci(2*k)); if (f >= n, my (v = 0); while (n, while (n >= f, n -= f; v += 3^(k-1);); f = fibonacci(2*k--);); return (v););); }
    a(n) = A381607(A263273(A381608(n)))

Formula

a(n) <= A000045(2*k) iff n <= A000045(2*k).
Showing 1-7 of 7 results.