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

A372288 Array read by upward antidiagonals: A(n, k) = A265745(A372282(n, k)), n,k >= 1, where A265745(n) is the sum of digits in "Jacobsthal greedy base".

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 5, 3, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 5, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

Collatz conjecture is equal to the claim that each column will eventually settle to constant 1's, somewhere under its topmost row. This works as only the bisection A002450 of Jacobsthal numbers (A001045) contains numbers of the form 4k+1, while the other bisection contains only numbers of the form 4k+3, which do not occur among the range of A372351. See also the comments in A371094.

Examples

			Array begins:
n\k| 1  2  3  4  5  6  7  8  9 10 11 12 13     14 15    16 17 18 19 20    21 22
---+----------------------------------------------------------------------------
1  | 1, 1, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3,     3, 3,    3, 3, 3, 3, 5,    5, 1,
2  | 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 1, 5, 5,     5, 3,    5, 3, 3, 3, 5,    5, 3,
3  | 1, 1, 1, 3, 3, 3, 1, 5, 1, 3, 1, 3, 3,     5, 3,    5, 5, 1, 3, 3,    5, 3,
4  | 1, 1, 1, 3, 3, 1, 1, 3, 1, 3, 1, 1, 3,     5, 3,    3, 3, 1, 3, 5,    5, 3,
5  | 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3,     5, 1,    5, 3, 1, 3, 3,    3, 3,
6  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,     3, 1,    5, 3, 1, 1, 5,    5, 3,
7  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    3, 3, 1, 1, 3,    5, 3,
8  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 3,    3, 3,
9  | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     3, 1,    5, 1, 1, 1, 3,    5, 1,
10 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 3,    5, 1,
11 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1, 2155, 1, 1, 1, 1,    5, 1,
12 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1, 6251, 1,
13 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10347, 1,    5, 1, 1, 1, 1,    5, 1,
14 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1,    5, 1,
15 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    7, 1, 1, 1, 1,    5, 1,
16 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     5, 1,    5, 1, 1, 1, 1,    7, 1,
		

Crossrefs

Cf. also array A372561 (formed by columns whose indices in this array are given by A372443).

Programs

A372555 Least number of Jacobsthal numbers that add up to n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 07 2024

Keywords

Comments

Differs from A265745 for the first time at n=63, where a(63) = 3, while A265745(63) = 5. The next differences occur at n=84, 148, 169, 191, 212, 234, 255, etc. See A372557.
See conjecture in A372556, and also in A372561.

Examples

			a(5) = 1, because 5 is itself in A001045.
a(7) = 3, because 7 can be expressed as a sum of three Jacobsthal numbers, either as 5+1+1 or 3+3+1, but not as a sum of two Jacobsthal numbers, and neither 7 is itself in A001045.
a(63) = 3, because the least number of Jacobsthal numbers that add up to 63 is obtained when we use A001045(6) = 21 three times, as 21+21+21 = 63. This is the first time this sequence differs from A265745.
		

Crossrefs

Programs

  • PARI
    up_to = 87381; \\ = A001045(18).
    A001045(n) = (2^n - (-1)^n) / 3;
    A130249(n) = (#binary(3*n+1)-1);
    A372555_or_556list(up_to_n,return_556_instead) = { my(v372555 = vector(up_to_n), v372556 = vector(up_to_n)); v372555[1] = 1; v372556[1] = 2; for(n=2,#v372556, my(m=-1,mk=-1,s=A130249(n)); if(A001045(s)==n, v372555[n] = 1; v372556[n] = s, forstep(k=s, 1, -1, my(c=v372555[n-A001045(k)]); if(m<0 || cA001045(mk)])); if(return_556_instead,v372556,v372555); };
    v372555 = A372555_or_556list(up_to,0);
    A372555(n) = if(!n,n,v372555[n]);
    
  • Scheme
    ;; An implementation of memoization-macro definec can be found for example in: http://oeis.org/wiki/Memoization
    (definec (A001045 n) (if (<= n 1) n (+ (A001045 (- n 1)) (* 2 (A001045 (- n 2))))))
    (define (A130249 n) (floor->exact (/ (log (+ 1 (* 3 n))) (log 2))))
    (define (A147612 n) (if (<= n 1) 1 (if (= (A001045 (A130249 n)) n) 1 0)))
    (definec (A372555 n) (if (<= n 1) n (+ 1 (A372555 (- n (A001045 (A372556 n)))))))
    (definec (A372556 n) (let ((k (A130249 n))) (if (= 1 (A147612 n)) k (let loop ((k k) (m #f) (mk #f)) (cond ((zero? k) mk) (else (let* ((c (A372555 (- n (A001045 k))))) (if (or (not m) (< c m)) (loop (- k 1) c k) (loop (- k 1) m mk)))))))))

Formula

a(0) = 0, a(1) = 1; for n > 1, a(n) = 1 + a(n-A001045(A372556(n))).

A372560 Array read by upward antidiagonals: A(n, k) = A371094(A(n-1, k)) for n > 1, k >= 1; A(1, k) = A372443(k-1).

Original entry on oeis.org

27, 165, 41, 8021, 501, 31, 12408149, 48469, 189, 47, 19607957362005, 299193685, 4565, 285, 71, 32439509492992549521282389, 7552911875069269, 1758549, 6869, 429, 107, 58947232705679751034215288252890081792789279233365, 3195535888075328282939605996885, 173230347605, 2643285, 10325, 645, 161
Offset: 1

Views

Author

Antti Karttunen, May 08 2024

Keywords

Examples

			Array begins:
n\k|        1          2        3        4        5         6           7
---+-----------------------------------------------------------------------
1  |       27,        41,      31,      47,      71,      107,        161,
2  |      165,       501,     189,     285,     429,      645,       1941,
3  |     8021,     48469,    4565,    6869,   10325,    31061,     374101,
4  | 12408149, 299193685, 1758549, 2643285, 7951701, 95769941, 9216283989,
		

Crossrefs

Cf. A371094, A372282, A372443 (the top row), A372444 (the leftmost column), A372561.

Programs

  • PARI
    up_to = 28;
    A000265(n) = (n>>valuation(n,2));
    A372443(n) = { my(x=27); while(n, x=A000265(3*x+1); n--); (x); };
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372560sq(n,k) = if(1==n,A372443(k-1),A371094(A372560sq(n-1,k)));
    A372560list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372560sq((a-(col-1)),col))); (v); };
    v372560 = A372560list(up_to);
    A372560(n) = v372560[n];
Showing 1-3 of 3 results.