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-10 of 11 results. Next

A285714 a(1) = 0; for n > 1, a(n) = 1 + a(A285712(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A285712(n)).
a(n) = A029837(1+A245611(n)).
a(n) = A285715(n) + A285716(n).

A292590 a(1) = 0; and for n > 1, a(n) = 2*a(A285712(n)) + [0 == (n mod 3)].

Original entry on oeis.org

0, 0, 1, 2, 0, 5, 10, 2, 21, 42, 4, 85, 0, 0, 171, 342, 10, 5, 684, 20, 1369, 2738, 4, 5477, 0, 42, 10955, 8, 84, 21911, 43822, 8, 21, 87644, 170, 175289, 350578, 0, 11, 701156, 0, 1402313, 40, 342, 2804627, 16, 684, 85, 5609254, 20, 11218509, 22437018, 10, 44874037, 89748074, 1368, 179496149, 168, 40, 43, 0, 2738, 1, 358992298, 5476, 717984597, 80, 8
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

Binary expansion of a(n) encodes the positions of multiples of three in the path taken from n to the root in the binary trees like A245612 and A244154.

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; a[n_] := a[n] = If[n == 1, n - 1, 2 a[f@ n] + Boole[Divisible[n, 3]]]; Array[a, 67] (* Michael De Vlieger, Sep 22 2017 *)
  • Scheme
    (define (A292590 n) (if (<= n 1) 0 (+ (if (zero? (modulo n 3)) 1 0) (* 2 (A292590 (A285712 n))))))

Formula

a(1) = 0; and for n > 1, a(n) = A079978(n) + 2*a(A285712(n)).
a(n) + A292591(n) = A245611(n).
a(A245612(n)) = A292592(n).
A000120(a(n)) = A292594(n).

A292591 a(1) = 0, a(2) = 1; and for n > 2, a(n) = 2*a(A285712(n)) + [1 == (n mod 3)].

Original entry on oeis.org

0, 1, 2, 5, 2, 10, 21, 4, 42, 85, 10, 170, 5, 4, 340, 681, 20, 8, 1363, 42, 2726, 5453, 8, 10906, 11, 84, 21812, 21, 170, 43624, 87249, 20, 40, 174499, 340, 348998, 697997, 10, 16, 1395995, 8, 2791990, 85, 680, 5583980, 43, 1362, 168, 11167961, 40, 22335922, 44671845, 16, 89343690, 178687381, 2726, 357374762, 341, 84, 80, 23, 5452, 8, 714749525, 10906
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

Binary expansion of a(n) encodes the positions of numbers of the form 3k+1 (with k >= 1) in the path taken from n to the root in the binary trees A245612 and A244154, except that the most significant 1-bit of a(n) always corresponds to 2 instead of 1 at the root of those trees.

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; a[n_] := a[n] = If[n <= 2, n - 1, 2 a[f@ n] + Boole[Mod[n, 3] == 1]]; Array[a, 65] (* Michael De Vlieger, Sep 22 2017 *)
  • Scheme
    (define (A292591 n) (if (<= n 2) (- n 1) (+ (if (= 1 (modulo n 3)) 1 0) (* 2 (A292591 (A285712 n))))))

Formula

a(n) + A292590(n) = A245611(n).
a(A245612(n)) = A292593(n).
A000120(a(n)) = A292595(n).

A286578 a(n) = A285712(A286577(n)).

Original entry on oeis.org

0, 0, 2, 3, 0, 4, 6, 2, 7, 9, 3, 10, 5, 0, 12, 15, 4, 8, 16, 6, 19, 21, 2, 22, 13, 7, 24, 11, 9, 27, 30, 3, 17, 31, 10, 34, 36, 5, 18, 37, 0, 40, 20, 12, 42, 28, 15, 26, 45, 4, 49, 51, 8, 52, 54, 16, 55, 29, 6, 33, 25, 19, 14, 57, 21, 64, 43, 2, 66, 69, 22, 39, 35, 13, 70, 75, 7, 44, 76, 24, 48, 79, 11, 82, 61, 9, 84, 23, 27, 87, 90, 30, 47, 46, 3
Offset: 1

Views

Author

Antti Karttunen, May 31 2017

Keywords

Crossrefs

Cf. A007051 (the positions of zeros), A064216, A285712, A286577, A285728.

Programs

Formula

a(n) = A285712(A286577(n)).

A244154 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = A254049(a(n)), a(2n+1) = 3*a(n)-1; composition of A048673 and A005940.

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 13, 14, 6, 11, 18, 23, 25, 38, 63, 41, 7, 17, 28, 32, 39, 53, 88, 68, 61, 74, 123, 113, 172, 188, 313, 122, 9, 20, 33, 50, 46, 83, 138, 95, 72, 116, 193, 158, 270, 263, 438, 203, 85, 182, 303, 221, 424, 368, 613, 338, 666, 515, 858, 563, 1201, 938, 1563, 365, 10, 26, 43, 59, 60
Offset: 0

Views

Author

Antti Karttunen, Jun 27 2014

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
From Antti Karttunen, May 30 2017: (Start)
This sequence can be represented as a binary tree. Each left hand child is obtained by applying A254049(n) when the parent contains n, and each right hand child is obtained by applying A016789(n-1) (i.e., multiply by 3, subtract one) to the parent's contents:
1
|
...................2...................
3 5
4......../ \........8 13......../ \........14
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
6 11 18 23 25 38 63 41
7 17 28 32 39 53 88 68 61 74 123 113 172 188 313 122
etc.
This is a mirror image of the tree depicted in A245612.
(End)

Crossrefs

Programs

Formula

a(n) = A048673(A005940(n+1)).
From Antti Karttunen, May 30 2017: (Start)
a(0) = 1, a(1) = 2, a(2n) = A254049(a(n)), a(2n+1) = 3*a(n)-1.
a(n) = A245612(A054429(n)).
(End)

A291763 Binary encoding of 2-digits in ternary representation of A245612(n).

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 3, 0, 1, 8, 1, 6, 5, 4, 1, 2, 1, 10, 23, 16, 1, 2, 13, 10, 9, 2, 7, 0, 1, 0, 3, 2, 1, 70, 21, 24, 45, 4, 33, 52, 1, 36, 3, 20, 25, 10, 21, 0, 17, 18, 5, 0, 13, 16, 3, 12, 1, 8, 1, 4, 5, 2, 5, 0, 1, 32, 139, 74, 41, 208, 49, 0, 89, 108, 11, 130, 65, 18, 103, 4, 1, 8, 73, 4, 5, 112, 41, 16, 49, 72, 19, 38, 41, 20, 1, 8, 33, 0, 35, 86, 9, 38
Offset: 0

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

Formula

a(n) = A289814(A245612(n)).

A285713 a(n) = A046523(A245612(n)).

Original entry on oeis.org

1, 2, 2, 2, 6, 2, 8, 4, 2, 12, 6, 4, 2, 12, 2, 6, 6, 2, 12, 12, 2, 6, 6, 2, 12, 24, 2, 6, 32, 12, 2, 2, 6, 6, 30, 2, 2, 210, 6, 60, 12, 2, 48, 24, 6, 6, 30, 6, 6, 30, 2, 120, 6, 2, 12, 72, 6, 30, 2, 6, 12, 6, 12, 4, 6, 6, 48, 60, 6, 60, 6, 2, 24, 192, 6, 6, 24, 768, 2, 6, 2, 6, 6, 6, 2, 30, 6, 210, 6, 6, 12, 48, 6, 12, 6, 6, 96, 12, 6, 30, 12, 12, 2, 2, 6
Offset: 0

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Crossrefs

Cf. A305434 (rgs-transform).

Programs

Formula

a(n) = A046523(A245612(n)).
a(n) = A278224(A163511(n)).
a(n) = A286613(A054429(n)). - Antti Karttunen, Jun 01 2018

A285715 a(n) = A000120(A245611(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Crossrefs

Cf. A007051 (positions of 0 and 1's).

Programs

Formula

a(1) = 0, a(2) = 1, for n > 2, a(n) = a(A285712(n)) + [n <> 2 mod 3]. (Where [] is Iverson bracket, giving here 1 if n is of the form 3k or 3k+1, and 0 if it is of the form 3k+2.)
a(n) = A000120(A245611(n)).

A285716 a(n) = A080791(A245611(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Crossrefs

One less than A091304 after the initial term.
Cf. A006254 (gives the positions of zeros after initial a(1)=0.)

Programs

  • Mathematica
    a[n_] := PrimeOmega[2*n - 1] - 1; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jul 23 2023 *)
  • Scheme
    ;; First implementation uses memoization-macro definec:
    (definec (A285716 n) (if (<= n 2) 0 (+ (if (= 2 (modulo n 3)) 1 0) (A285716 (A285712 n)))))
    (define (A285716 n) (A080791 (A245611 n)))

Formula

a(1) = 0, a(2) = 1, for n > 2, a(n) = a(A285712(n)) + [n == 2 mod 3]. (Where [] is Iverson bracket, giving here 1 only if n is of the form 3k+2, and 0 otherwise.)
a(n) = A080791(A245611(n)).
For all n >= 2, a(n) = A091304(n)-1 = A000120(A244153(n))-1. - Antti Karttunen, May 31 2017

A292594 a(n) = A000120(A292590(n)).

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 2, 1, 3, 3, 1, 4, 0, 0, 5, 5, 2, 2, 5, 2, 6, 6, 1, 7, 0, 3, 8, 1, 3, 9, 9, 1, 3, 9, 4, 10, 10, 0, 3, 10, 0, 11, 2, 5, 12, 1, 5, 4, 12, 2, 13, 13, 2, 14, 14, 5, 15, 3, 2, 4, 0, 6, 1, 15, 6, 16, 2, 1, 17, 17, 7, 4, 4, 0, 18, 18, 3, 6, 18, 8, 5, 18, 1, 19, 0, 3, 20, 1, 9, 21, 21, 9, 6, 1, 1, 22, 22, 3, 23, 23, 9, 4, 5, 4, 5
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

Locate the node which contains n in binary tree A245612 (or in its mirror-image A244154) and traverse from that node towards the root, counting all multiples of three that occur on the path. More formally, for n > 1, a(n) counts the multiples of 3 encountered until 1 is reached, when we iterate the map x -> A285712(x), starting from x=n. The count includes also n itself if it is a multiple of 3.

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; a[n_] := a[n] = If[n == 1, n - 1, 2 a[f@ n] + Boole[Divisible[n, 3]]]; Array[DigitCount[a@ #, 2, 1] &, 105] (* Michael De Vlieger, Sep 22 2017 *)

Formula

a(1) = 0; and for n > 1, a(n) = A079978(n) + a(A285712(n)).
a(n) = A000120(A292590(n)).
a(n) + A292595(n) = A285715(n).
Showing 1-10 of 11 results. Next