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.

A246271 Starting from A003961(n), the number of additional iterations of A003961 required for the result to be of the form 4k+1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Examples

			a(5) = 2, because exactly two additional iterations of A003961 are needed before A003961(5) = 7 is of the form 4k+1; as A003961(7) = 11 and A003961(11) = 13. (We have 7 = 3 mod 4, 11 = 3 mod 4 and 13 = 1 mod 4.)
		

Crossrefs

A246261 gives the positions of zeros, A246263 the positions of nonzeros.
A246280 the positions where n occurs for the first time, A246167 the positions of new distinct values.

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A246271(n) = {my(i); i=0; n = A003961(n); while(((n%4)!=1), i++; n = A003961(n)); i};
    for(n=1, 10001, write("b246271.txt", n, " ", A246271(n)));
    (Scheme, two different variants, the second one employing memoizing definec-macro)
    (define (A246271 n) (let loop ((i 0) (n n)) (let ((next (A003961 n))) (if (= 1 (modulo next 4)) i (loop (+ i 1) next)))))
    (definec (A246271 n) (if (= 1 (A246260 n)) 0 (+ 1 (A246271 (A003961 n)))))

Formula

If A246260(n) = 1, a(n) = 0, otherwise 1 + a(A003961(n)).

A246259 Square array: row n contains in ascending order all natural numbers k for which A246271(k)+1 = n, i.e., numbers m for which we need n-1 additional iterations of A003961, starting from A003961(m), before the result is 1 modulo 4.

Original entry on oeis.org

1, 3, 2, 4, 7, 5, 9, 8, 6, 66, 10, 15, 17, 70, 91, 11, 18, 20, 94, 197, 55, 12, 19, 24, 186, 259, 155, 21, 13, 22, 26, 187, 364, 220, 84, 46, 14, 28, 41, 199, 377, 238, 87, 184, 1362, 16, 29, 45, 237, 413, 467, 189, 414, 1981, 1654, 23, 32, 54, 262, 479, 495, 309, 445, 2378, 3055, 1419
Offset: 1

Views

Author

Antti Karttunen, Aug 22 2014

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
The topmost row, which has row number 1, is the sequence A246261 (numbers n such that A003961(n) is of the form 4k+1), as these are exactly the numbers that do not require any additional iterations of A003961 for the result to be of the form 4k+1 (because it already is of that form).
If a number k occurs in any particular row, then 4k, 9k, 16k, etc. also occur on the same row, because multiplying a number by a perfect square does not affect the result when it is reduced modulo 4.
The array has an infinite number of rows, provided that A246271 is not bounded, because if A246271(n) = k > 0 for some n, then A246271(A003961(n)) = k-1, thus all the preceding rows would also have terms. However, if A246271 really had an absolute maximum m, then we can consider the array to have just m rows. In either case, all the natural numbers occur in it, each just once, thus the sequence forms a permutation of natural numbers.
Applying A003961 to the terms of any row below the first row gives a subsequence of the immediately preceding row.

Examples

			The top left corner of the array:
   1,   3,   4,   9,  10,  11,  12,  13,  14,  16,  23,  25, ...
   2,   7,   8,  15,  18,  19,  22,  28,  29,  32,  43,  50, ...
   5,   6,  17,  20,  24,  26,  41,  45,  54,  57,  61,  68, ...
  66,  70,  94, 186, 187, 199, 237, 262, 264, 278, 280, 286, ...
  91  197, 259, 364, 377, 413, 479, 627, 665, 669, 705, 763, ...
  55, 155, 220, 238, 467, 495, 497, 526, 535, 543, 620, 880, ...
  21,  84,  87, 189, 309, 336, 348, 358, 463, 525, 679, 756, ...
  ...
2 is the least number k such that A003961(k) = 3 modulo 4, but A003961(A003961(k)) = 1 modulo 4 (as indeed A003961(2) = 3, and A003961(3) = 5). Thus A(2,1) = 2.
7 is the second smallest number k satisfying the same property, as A003961(7) = 11 (= 3 mod 4) while A003961(11) = 13 (= 1 mod 4). Thus A(2,2) = 7.
8 is the third smallest number k satisfying the same property, as A003961(8)=27 ( = 3 mod 4) while A003961(27) = 125 = 1 mod 4. Thus A(2,3) = 8.
5 is the least number k such that both A003961(k) and A003961(A003961(k)) = 3 mod 4 but A003961(A003961(A003961(k))) = 1 mod 4. Indeed A003961(5) = 7, A003961(7) = 11 and only at A003961(11) = 13 = 1 mod 4. Thus A(3,1) = 5.
		

Crossrefs

Transpose: A246258.
First row: A246261.
First column: A246280.

A246167 Positions where distinct new values of A246271 appear for the first time.

Original entry on oeis.org

1, 2, 5, 21, 46, 55, 66, 91, 574, 1362, 1419, 1654, 3497, 4607, 5263, 6463, 430261, 545869, 554111, 567583, 574823, 589843, 8781429, 14635735, 20490043
Offset: 1

Views

Author

Antti Karttunen, Aug 23 2014

Keywords

Comments

As this is the sequence A246280 sorted into ascending order, this is also expected to grow roughly as a(n) ~ 2^(n-1). (In this sequence we use one-based indexing.) Please see comments in A246280.
The corresponding new values at A246271(a(n)) are 0, 1, 2, 6, 7, 5, 3, 4, 11, 8, 10, 9, 15, 14, 13, 12, 17, 21, 20, 19, 18, 16, 24, 23, 22, ... (which is a permutation of the nonnegative integers).

Crossrefs

Showing 1-3 of 3 results.