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.

A286667 Positions of 1 in A286665; complement of A286666.

Original entry on oeis.org

2, 4, 5, 7, 9, 10, 12, 14, 16, 17, 19, 21, 22, 24, 26, 28, 29, 31, 33, 34, 36, 38, 39, 41, 43, 45, 46, 48, 50, 51, 53, 55, 57, 58, 60, 62, 63, 65, 67, 68, 70, 72, 74, 75, 77, 79, 80, 82, 84, 86, 87, 89, 91, 92, 94, 96, 98, 99, 101, 103, 104, 106, 108, 109
Offset: 1

Views

Author

Clark Kimberling, May 13 2017

Keywords

Comments

a(n) - a(n-1) is in {2,3} for n>=2. Conjecture: a(n)/n -> 1 + sqrt(1/2).
This conjecture follows easily from the fact that (a(n)) is a Beatty sequence, see my comments in A286665. - Michel Dekking, Mar 11 2018
Numbers with a positive number of trailing 0's in their minimal representation in terms of the positive Pell numbers (A317204). - Amiram Eldar, Mar 16 2022

Examples

			As a word, A286665 = 010110101101010110101101..., in which 1 is in positions 2,4,5,7,9,...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 0, 1}, 1 -> {0}}] &, {0}, 6] (* A171588 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0" -> "01"}]
    st = ToCharacterCode[w1] - 48 ; (* A286665 *)
    p0 = Flatten[Position[st, 0]];  (* A286666 *)
    p1 = Flatten[Position[st, 1]];  (* A286667 *)

A352416 A permutation related to minimal Pell representations: append a 0 after each 2 in the ternary expansion of n, and then replace each place value, say 3^k with k >= 0, by A000129(k+1).

Original entry on oeis.org

0, 1, 4, 2, 3, 9, 10, 11, 28, 5, 6, 16, 7, 8, 21, 22, 23, 57, 24, 25, 62, 26, 27, 67, 68, 69, 168, 12, 13, 33, 14, 15, 38, 39, 40, 98, 17, 18, 45, 19, 20, 50, 51, 52, 127, 53, 54, 132, 55, 56, 137, 138, 139, 337, 58, 59, 144, 60, 61, 149, 150, 151, 366, 63, 64
Offset: 0

Views

Author

Rémy Sigrist, Mar 15 2022

Keywords

Comments

This sequence is to Pell numbers what A048680 is to Fibonacci numbers.
This sequence is a permutation of the nonnegative integers, with inverse A352417.

Examples

			For n = 7:
- the ternary expansion of 7 is "21",
- after appending 0's, we obtain "201",
- so a(7) = 2*A000129(2+1) + 0*A000129(1+1) + 1*A000129(0+1) = 2*5 + 1*1 = 11.
		

Crossrefs

Cf. A000129, A048680, A317204, A352417 (inverse).

Programs

  • PARI
    a(n) = { my (v=0, t=0, d); for (k=0, oo, if (n, d=n%3; n\=3; if (d==2, t++); if (d, v+=d*([2, 1; 1, 0]^(k+1+t))[2, 1]), return (v))) }

A352417 Inverse permutation to A352416.

Original entry on oeis.org

0, 1, 3, 4, 2, 9, 10, 12, 13, 5, 6, 7, 27, 28, 30, 31, 11, 36, 37, 39, 40, 14, 15, 16, 18, 19, 21, 22, 8, 81, 82, 84, 85, 29, 90, 91, 93, 94, 32, 33, 34, 108, 109, 111, 112, 38, 117, 118, 120, 121, 41, 42, 43, 45, 46, 48, 49, 17, 54, 55, 57, 58, 20, 63, 64, 66
Offset: 0

Views

Author

Rémy Sigrist, Mar 15 2022

Keywords

Examples

			A352416(7) = 11, so a(11) = 7.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (p=[1, 2]); for (k=2, oo, if (n<=p[k], my (v=0, d); while (n, v+=3^k*d=n\p[k]; if (d==2, v/=3); n-=d*p[k]; k--); return (v/3), p = concat(p, 2*p[k]+p[k-1]))) }
Previous Showing 11-13 of 13 results.