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.

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)).

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).

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).

A292595 a(n) = A000120(A292591(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

If n > 1, then locate the node which contains n in binary tree A245612 (or in its mirror-image A244154) and traverse from that node towards the root [by iterating the map n -> A285712(n)], at the same time counting all numbers of the form 3k+1 that occur on the path, down to the final 1. This count includes also n itself if it is of the form 3k+1, with k > 0 (thus a(1) = 0).

Crossrefs

Programs

  • Scheme
    (define (A292595 n) (if (<= n 2) (- n 1) (+ (if (= 1 (modulo n 3)) 1 0) (A292595 (A285712 n)))))

Formula

a(1) = 0, a(2) = 1, and for n > 1, a(n) = a(A285712(n)) + [1 == (n mod 3)].
a(n) = A000120(A292591(n)).
a(n) + A292594(n) = A285715(n).
Showing 1-5 of 5 results.