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

A307074 a(n) is the smallest k such that A307092(k) = n.

Original entry on oeis.org

1, 2, 3, 5, 9, 15, 27, 47, 55, 95, 187, 191, 375, 415, 751, 831, 1503, 1663, 3007, 3327, 6639, 7039, 13279, 14079, 26559, 28159, 53119, 56319, 106239, 112639, 212479, 225279, 424959, 450559, 849919, 901119, 1699839, 1802239, 3399679, 3604479, 6799359, 7208959
Offset: 0

Views

Author

Yancheng Lu, Mar 22 2019

Keywords

Comments

a(n) is the smallest number k such that exactly n iterations of the mapping x -> x + x^j, where j is a nonnegative integer, are required to reach x=k from x=1 (the j's in each iteration need not be identical).

Examples

			n  |a(n)| maps                         | exponents
---+----+------------------------------+------------
1  | 1  | 1                            | []
2  | 2  | 1 -> 2                       | [0]
3  | 3  | 1 -> 2 -> 3                  | [0,0]
4  | 5  | 1 -> 2 -> 4 -> 5             | [0,1,0]
5  | 9  | 1 -> 2 -> 4 -> 8 -> 9        | [0,1,1,0]
6  | 15 | 1 -> 2 -> 6 -> 7 -> 14 -> 15 | [0,2,0,1,0]
		

Crossrefs

Cf. A307092.

Programs

  • Mathematica
    (* To get more terms of the sequence, increase terms and maxx,
       and then set maxi=trunc(lb(maxx)) *)
    maxi=16;maxx=65536;terms=10;
    a = NestList[
      Function[list,
       DeleteDuplicates[
        Join[list,
         Flatten[Table[If[# + #^i <= maxx, # + #^i, 1], {i, 0, maxi}] & /@
           list]]]], {1}, terms];
    b = Prepend[Table[Complement[a[[i + 1]], a[[i]]], {i, Length[a] - 1}],
       First[a]];
    Min /@ b

A309997 Number of paths from 2 to n of length A307092(n) - 1 via maps of the form x -> x + x^j, where j is a nonnegative integer.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2
Offset: 2

Views

Author

Peter Kagey, Aug 26 2019

Keywords

Comments

This sequence counts paths starting from 2 since there are an infinite number of maps from 1 to 2 via 1 -> 1 + 1^j.
Records occur at 2, 12, 226, 372, 744, 1490, 139511, ...

Examples

			For n = 520, the a(520) = 3 sequences of A307092(520)-1 = 3 maps are:
2 -> 2 + 2^1 -> 4 + 4^1     -> 8 + 8^3     = 520
2 -> 2 + 2^1 -> 4 + 4^4     -> 260 + 260^1 = 520
2 -> 2 + 2^7 -> 130 + 130^1 -> 260 + 260^1 = 520
With exponents (1,1,3), (1,4,1), and (7,1,1) respectively.
		

Crossrefs

A309978 a(n) is the number of positive integers k such that there exists a nonnegative integer m with k + k^m = n.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Aug 28 2019

Keywords

Comments

Records occur at 1, 2, 4, 6, 30, ...
Does there exist n such that a(n) >= 5? Do there exist examples besides 30 and 130 such that a(n) = 4? If so in either case, n > A253913(10000) = 87469256.

Examples

			For n = 130 the a(130) = 4 positive integers with valid maps are
  129 via 129 + 129^0 = 130,
   65 via  65 +  65^1 = 130,
    5 via   5 +   5^3 = 130, and
    2 via   2 +   2^7 = 130.
		

Crossrefs

Programs

  • PARI
    a(n) = {if (n==1, return (0)); my(d = divisors(n)); 1 + sumdiv(n, d, if ((d>1) && (dMichel Marcus, Oct 16 2019

Formula

a(2n+1) = 1 for all n >= 1.
a(2n) >= 2 for all n >= 2.

A328422 Number of paths from 2 to n via maps of the form x -> x + x^j, where j is a nonnegative integer.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 6, 6, 9, 9, 14, 14, 18, 18, 24, 24, 31, 31, 42, 42, 51, 51, 65, 65, 79, 79, 97, 97, 118, 118, 142, 142, 167, 167, 198, 198, 229, 229, 271, 271, 317, 317, 368, 368, 419, 419, 484, 484, 549, 549, 628, 628, 707, 707, 808, 808, 905, 905, 1023
Offset: 2

Views

Author

Peter Kagey, Oct 15 2019

Keywords

Comments

This sequence is essentially the same as the number of paths from 1 to n. However, starting from 2 removes the ambiguity of how many maps there are from 1 to 2.
a(2n+1) = a(2n) for all n because x + x^j is odd if and only if x is even and j = 0.

Examples

			For n = 8 the a(8) = 6 paths are:
2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 with j = [0,0,0,0,0,0]
2 -> 3 -> 4 -> 8                with j = [0,0,1]
2 -> 3 -> 6 -> 7 -> 8           with j = [0,1,0,0]
2 -> 4 -> 5 -> 6 -> 7 -> 8      with j = [1,0,0,0,0]
2 -> 4 -> 8                     with j = [1,1]
2 -> 6 -> 7 -> 8                with j = [2,0,0]
		

Crossrefs

Formula

a(2) = 1, a(n) = Sum_{k=1..A309978(n)} a(A328446(n,k)) for n > 2.

A328446 Table read by rows: the n-th row gives the nonnegative integers k such that n - k is a power of k.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 2, 3, 5, 6, 4, 7, 8, 2, 5, 9, 10, 3, 6, 11, 12, 7, 13, 14, 8, 15, 16, 2, 9, 17, 18, 4, 10, 19, 20, 11, 21, 22, 12, 23, 24, 13, 25, 26, 14, 27, 28, 3, 5, 15, 29, 30, 16, 31, 32, 2, 17, 33, 34, 18, 35, 36, 19, 37, 38, 20, 39, 40, 6, 21, 41, 42, 22
Offset: 1

Views

Author

Peter Kagey, Oct 15 2019

Keywords

Comments

The n-th row has length A309978(n) for n > 1.

Examples

			Table begins
   n | n-th row
  ---+----------
   1 | 0
   2 | 1
   3 | 2
   4 | 2, 3
   5 | 4
   6 | 2, 3, 5
   7 | 6
   8 | 4, 7
   9 | 8
  10 | 2, 5, 9
  11 | 10
  12 | 3, 6, 11
  13 | 12
  14 | 7, 13
  15 | 14
  16 | 8, 15
  17 | 16
  18 | 2, 9, 17
For n = 10 the 10th row is 2, 5, 9 because
10 - 2 = 2^3,
10 - 5 = 5^1, and
10 - 9 = 9^0.
		

Crossrefs

Programs

  • PARI
    row(n) = {if (n==1, return ([0])); my(row = vector(0)); fordiv(n, d, if ((d>1) && (dMichel Marcus, Oct 16 2019
Showing 1-5 of 5 results.