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.

A335155 Start with 1; if n is in the sequence, so are n+5 and 3*n.

Original entry on oeis.org

1, 3, 6, 8, 9, 11, 13, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 71, 72, 73, 74, 76, 77, 78, 79, 81, 82, 83, 84, 86, 87, 88, 89, 91, 92, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 106
Offset: 1

Views

Author

N. J. A. Sloane, Jun 05 2020

Keywords

Comments

This is the lexicographically earliest sequence of positive numbers with the property that if n is in the sequence, so are n+5 and 3*n.
Suggested by A335365 (which is the complement).

Crossrefs

Cf. A335365.
See also A005658, A005660, A005662, etc.

Programs

  • PARI
    Vec(x*(1 + 2*x + 3*x^2 + 2*x^3 - x^6 - x^7 + x^8 - x^10 + x^11 - x^13 + x^14 - x^15 - x^16) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^60)) \\ Colin Barker, Jun 07 2020

Formula

From Colin Barker, Jun 07 2020: (Start)
G.f.: x*(1 + 2*x + 3*x^2 + 2*x^3 - x^6 - x^7 + x^8 - x^10 + x^11 - x^13 + x^14 - x^15 - x^16) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>17.
(End)

A335392 a(n) is the number of ways to reach n by the process of starting from 1 and repeatedly adding 5 or multiplying by 3.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 2, 1, 0, 1, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 1, 3, 2, 0, 1, 1, 3, 3, 0, 1, 2, 3, 3, 0, 1, 2, 4, 3, 0, 1, 2, 4, 5, 0, 1, 3, 4, 5, 0, 1, 3, 5, 5, 0, 1, 3, 5, 7, 0, 1, 5, 5, 7, 0, 1, 5, 6, 7, 0, 2, 5, 6, 9, 0, 2, 7
Offset: 1

Views

Author

Rémy Sigrist, Jun 05 2020

Keywords

Comments

This sequence has connections with A018819, the number of ways to reach a number by the process of starting from 1 and repeatedly adding 1 or multiplying by 2.

Examples

			For n = 18:
- 18 can be expressed as (1+5)*3 and 1*3 + 5 + 5 + 5,
- so a(18) = 2.
		

Crossrefs

Programs

  • PARI
    for (n=1, #a=vector(87), print1 (a[n]=if (n==1, 1, if (n-5>0, a[n-5], 0)+if (n%3==0, a[n/3], 0))", "))

Formula

a(n) = 0 iff n belongs to A335365.
a(n) = #{ k > 0 such that A335393(k) = n }.

A335393 a(1) = 1 and for any n >= 1, a(2*n) = a(n) + 5, a(2*n+1) = a(n) * 3.

Original entry on oeis.org

1, 6, 3, 11, 18, 8, 9, 16, 33, 23, 54, 13, 24, 14, 27, 21, 48, 38, 99, 28, 69, 59, 162, 18, 39, 29, 72, 19, 42, 32, 81, 26, 63, 53, 144, 43, 114, 104, 297, 33, 84, 74, 207, 64, 177, 167, 486, 23, 54, 44, 117, 34, 87, 77, 216, 24, 57, 47, 126, 37, 96, 86, 243
Offset: 1

Views

Author

Rémy Sigrist, Jun 05 2020

Keywords

Comments

All terms belong to A335155.
For any k > 0, the value k appears A335392(k) times.

Examples

			a(12) = a(6) + 5 = a(3) + 5 + 5 = a(1) * 3 + 5 + 5 = 1 * 3 + 5 + 5 = 13.
		

Crossrefs

Programs

  • PARI
    a(n) = { if (n==1, 1, n%2==0, a(n\2)+5, a(n\2)*3) }

Formula

a(2^k) = 1 + 5*k for any k >= 0.
a(2^k-1) = 2^(k-1) for any k > 0.

A335409 a(n) is the least k such that A335155(n) = A335393(k).

Original entry on oeis.org

1, 3, 2, 6, 7, 4, 12, 14, 8, 5, 28, 16, 10, 13, 32, 15, 20, 26, 64, 30, 9, 52, 128, 60, 18, 25, 256, 29, 36, 50, 512, 58, 17, 100, 1024, 116, 34, 11, 2048, 57, 68, 22, 4096, 114, 33, 44, 8192, 228, 66, 21, 16384, 27, 132, 42, 32768, 54, 65, 84, 31, 108, 130
Offset: 1

Views

Author

Rémy Sigrist, Jun 06 2020

Keywords

Comments

For any n > 0, the binary representation of a(n) encodes a minimal way (in the sense of the number of operations) of obtaining A335155(n) by starting from 1 and then repeatedly adding 5 or multiplying by 3; the leading 1 corresponds to the starting value 1, and then the 0's correspond to adding 5 and the 1's correspond to multiplying by 3.

Examples

			The first terms, alongside their binary representation and A335155(n), are:
  n   a(n)  bin(a(n))  A335155(n)
  --  ----  ---------  ----------
   1     1          1   1 = 1
   2     3         11   3 = 1*3
   3     2         10   6 = 1+5
   4     6        110   8 = (1*3)+5
   5     7        111   9 = 1*3*3
   6     4        100  11 = 1+5+5
   7    12       1100  13 = (1*3)+5+5
   8    14       1110  14 = (1*3*3)+5
   9     8       1000  16 = 1+5+5+5
  10     5        101  18 = (1+5)*3
  11    28      11100  19 = (1*3*3)+5+5
  12    16      10000  21 = 1+5+5+5+5
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

A335155(n) = A335393(a(n)).
Showing 1-4 of 4 results.