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 17 results. Next

A269171 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A269379(a(A268674(2n+1))).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 20, 21, 22, 25, 24, 19, 26, 27, 28, 29, 30, 37, 32, 33, 34, 35, 36, 41, 46, 39, 40, 43, 42, 47, 44, 45, 50, 53, 48, 31, 38, 51, 52, 61, 54, 49, 56, 57, 58, 67, 60, 71, 74, 63, 64, 65, 66, 77, 68, 69, 70, 83, 72, 89, 82, 75, 92, 59, 78, 91, 80, 81, 86, 97, 84, 79, 94, 87, 88, 107, 90, 85, 100
Offset: 1

Views

Author

Antti Karttunen, Mar 03 2016

Keywords

Crossrefs

Inverse: A269172.
Related or similar permutations: A260741, A260742, A269355, A269357, A255421, A252754, A252756, A269385, A269387.
Cf. also A269393 (a(3n)/3) and A269395.
Differs from A255407 for the first time at n=38, where a(38) = 46, while A255407(38) = 38.

Formula

a(1) = 1, then after for even n, a(n) = 2*a(n/2), and for odd n, a(n) = A269379(a(A268674(n))).
a(1) = 1, for n > 1, a(n) = A255127(A055396(n), a(A078898(n))).
As a composition of other permutations:
a(n) = A269385(A252756(n)).
a(n) = A269387(A252754(n)).
Other identities. For all n >= 1:
A000035(a(n)) = A000035(n). [Preserves the parity of n.]
a(A008578(n)) = A003309(n). [Maps noncomposites to Ludic numbers.]

A302026 Permutation of natural numbers mapping "Ludic factorization" to ordinary factorization: a(1) = 1, a(2n) = 2*a(n), a(A269379(n)) = A003961(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 25, 20, 27, 22, 19, 24, 23, 26, 21, 28, 29, 30, 49, 32, 45, 34, 35, 36, 31, 50, 33, 40, 37, 54, 41, 44, 81, 38, 43, 48, 125, 46, 75, 52, 47, 42, 121, 56, 63, 58, 77, 60, 53, 98, 39, 64, 55, 90, 59, 68, 135, 70, 61, 72, 169, 62, 51, 100, 67, 66, 175, 80, 99, 74, 71, 108, 343, 82, 105, 88
Offset: 1

Views

Author

Antti Karttunen, Apr 03 2018

Keywords

Comments

See comments and examples in A302032 to see how Ludic factorization proceeds.

Crossrefs

Cf. A302025 (inverse permutation).
Cf. A005940, A250246, A269172, A269388 (similar or related permutations).

Programs

Formula

a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A003961(a(A269380(2n+1))).
a(n) = A250246(A269172(n)).
a(n) = A005940(1+A269388(n)).
Other identities. For all n >= 1:
A001221(a(n)) = A302031(n).
A001222(a(n)) = A302037(n).

A302025 Permutation of natural numbers mapping ordinary factorization to "Ludic factorization": a(1) = 1, a(2n) = 2*a(n), a(A003961(n)) = A269379(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 20, 27, 22, 25, 24, 19, 26, 21, 28, 29, 30, 37, 32, 39, 34, 35, 36, 41, 46, 63, 40, 43, 54, 47, 44, 33, 50, 53, 48, 31, 38, 75, 52, 61, 42, 65, 56, 99, 58, 67, 60, 71, 74, 57, 64, 95, 78, 77, 68, 135, 70, 83, 72, 89, 82, 51, 92, 59, 126, 91, 80, 45, 86, 97, 108, 155, 94, 147, 88
Offset: 1

Views

Author

Antti Karttunen, Apr 03 2018

Keywords

Comments

See comments and examples in A302032 to see how Ludic factorization proceeds.

Crossrefs

Cf. A302026 (inverse permutation).
Cf. A156552, A250245, A269171, A269387 (similar or related permutations).

Programs

Formula

a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A269379(a(A064989(2n+1))).
a(n) = A269171(A250245(n)).
a(n) = A269387(A156552(n)).

A269387 Tree of Ludic sieve: a(0) = 1, a(1) = 2; after which, a(2n) = A269379(a(n)), a(2n+1) = 2*a(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 19, 18, 21, 16, 11, 14, 27, 20, 35, 30, 33, 24, 31, 38, 51, 36, 49, 42, 45, 32, 13, 22, 39, 28, 65, 54, 57, 40, 59, 70, 87, 60, 79, 66, 69, 48, 55, 62, 111, 76, 125, 102, 105, 72, 85, 98, 123, 84, 109, 90, 93, 64, 17, 26, 63, 44, 95, 78, 81, 56, 113, 130, 159, 108, 139, 114, 117, 80
Offset: 0

Views

Author

Antti Karttunen, Mar 01 2016

Keywords

Comments

Permutation of natural numbers obtained from the Ludic sieve. Note the indexing: Domain starts from 0, range from 1.
This sequence can be represented as a binary tree. Each left hand child is obtained by applying A269379 to the parent's contents, and each right hand child is obtained by doubling the parent's contents:
1
|
...................2...................
3 4
5......../ \........6 9......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 10 15 12 19 18 21 16
11 14 27 20 35 30 33 24 31 38 51 36 49 42 45 32
etc.
Sequence A269385 is obtained from the mirror image of the same tree.

Crossrefs

Inverse: A269388.
Cf. A003309 (left edge of the tree).
Cf. A269379.
Related permutations: A260741, A269171, A269385.
Cf. also A252753, A269377.

Formula

a(0) = 1, a(1) = 2; after which, a(2n) = A269379(a(n)), a(2n+1) = 2*a(n).
As a composition of other permutations:
a(n) = A269171(A252753(n)).
a(n) = A260741(A269377(n)).

A269385 Tree of Ludic sieve, mirrored: a(0) = 1, a(1) = 2; after which, a(2n) = 2*a(n), a(2n+1) = A269379(a(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 5, 16, 21, 18, 19, 12, 15, 10, 7, 32, 45, 42, 49, 36, 51, 38, 31, 24, 33, 30, 35, 20, 27, 14, 11, 64, 93, 90, 109, 84, 123, 98, 85, 72, 105, 102, 125, 76, 111, 62, 55, 48, 69, 66, 79, 60, 87, 70, 59, 40, 57, 54, 65, 28, 39, 22, 13, 128, 189, 186, 229, 180, 267, 218, 191, 168, 249, 246, 305, 196, 291, 170, 151, 144
Offset: 0

Views

Author

Antti Karttunen, Mar 01 2016

Keywords

Comments

Permutation of natural numbers obtained from the Ludic sieve. Note the indexing: Domain starts from 0, range from 1.
This sequence can be represented as a binary tree. Each left hand child is obtained by doubling the parent's contents, and each right hand child is obtained by applying A269379 to the parent's contents:
1
|
...................2...................
4 3
8......../ \........9 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 21 18 19 12 15 10 7
32 45 42 49 36 51 38 31 24 33 30 35 20 27 14 11
etc.
Sequence A269387 is obtained from the mirror image of the same tree.

Crossrefs

Inverse: A269386.
Cf. A003309 (right edge of the tree).
Related or similar permutations: A163511, A260741, A269387, A269171.
Cf. also A252755, A269375.

Formula

a(0) = 1, a(1) = 2; after which, a(2n) = 2*a(n), a(2n+1) = A269379(a(n)).
As a composition of related permutations:
a(n) = A269171(A252755(n)).
a(n) = A260741(A269375(n)).
Other identities. For all n >= 2:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n from a(2)=4 onward.]

A269356 Permutation of natural numbers: a(n) = A268674(A269379(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, 13, 14, 15, 16, 19, 18, 29, 20, 25, 22, 9, 24, 23, 26, 27, 28, 31, 30, 21, 32, 73, 34, 53, 36, 37, 38, 39, 40, 41, 42, 43, 44, 107, 46, 47, 48, 33, 50, 51, 52, 59, 54, 71, 56, 137, 58, 101, 60, 61, 62, 63, 64, 109, 66, 67, 68, 121, 70, 35, 72, 97, 74, 75, 76, 79, 78, 131, 80, 197
Offset: 1

Views

Author

Antti Karttunen, Mar 03 2016

Keywords

Examples

			For n=9 we first find what number is below 9 in square array A255127, which is 19, then we find what number is above 19 in square array A083221, which is 17, thus a(9) = 17.
		

Crossrefs

Inverse: A269355.
Cf. also arrays A083221 & A255127.
More recursed variant: A269358. Cf. also permutations A266646, A255408, A269172.

Programs

Formula

a(n) = A268674(A269379(n)).
Other identities. For all n >= 1:
a(2n) = 2n. [Fixes the even numbers.]

A269358 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A268674(A269379(2n+1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, 13, 14, 15, 16, 19, 34, 29, 20, 25, 22, 9, 24, 23, 26, 27, 28, 31, 30, 21, 32, 73, 38, 53, 68, 37, 58, 39, 40, 41, 50, 43, 44, 107, 18, 47, 48, 33, 46, 51, 52, 59, 54, 71, 56, 137, 62, 101, 60, 61, 42, 63, 64, 109, 146, 67, 76, 121, 106, 35, 136, 97, 74, 75, 116, 79, 78, 131, 80, 197
Offset: 1

Views

Author

Antti Karttunen, Mar 03 2016

Keywords

Comments

This is a variant of A269356, from which it differs for the first time at n=18.

Crossrefs

Formula

a(1) = 1, after which, for even n, a(n) = 2*a(n/2) and for odd n, a(n) = A269356(n) = A268674(A269379(n)).
Other identities. For all n >= 1:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A269382 Permutation of even numbers: a(n) = A269379(n+1) - 1.

Original entry on oeis.org

0, 2, 4, 8, 6, 14, 10, 20, 18, 26, 12, 32, 16, 38, 34, 44, 22, 50, 30, 56, 48, 62, 24, 68, 28, 74, 64, 80, 36, 86, 54, 92, 78, 98, 58, 104, 40, 110, 94, 116, 42, 122, 46, 128, 108, 134, 52, 140, 84, 146, 124, 152, 60, 158, 72, 164, 138, 170, 102, 176, 66, 182, 154, 188, 112, 194, 70, 200, 168, 206, 76, 212, 100, 218, 184, 224, 82
Offset: 0

Views

Author

Antti Karttunen, Mar 01 2016

Keywords

Crossrefs

Cf. also A253886, A269372.

Programs

Formula

a(n) = A269379(n+1) - 1.

A003961 Completely multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 11, 27, 25, 21, 13, 45, 17, 33, 35, 81, 19, 75, 23, 63, 55, 39, 29, 135, 49, 51, 125, 99, 31, 105, 37, 243, 65, 57, 77, 225, 41, 69, 85, 189, 43, 165, 47, 117, 175, 87, 53, 405, 121, 147, 95, 153, 59, 375, 91, 297, 115, 93, 61, 315, 67, 111, 275, 729, 119
Offset: 1

Views

Author

Keywords

Comments

Meyers (see Guy reference) conjectures that for all r >= 1, the least odd number not in the set {a(i): i < prime(r)} is prime(r+1). - N. J. A. Sloane, Jan 08 2021
Meyers' conjecture would be refuted if and only if for some r there were such a large gap between prime(r) and prime(r+1) that there existed a composite c for which prime(r) < c < a(c) < prime(r+1), in which case (by Bertrand's postulate) c would necessarily be a term of A246281. - Antti Karttunen, Mar 29 2021
a(n) is odd for all n and for each odd m there exists a k with a(k) = m (see A064216). a(n) > n for n > 1: bijection between the odd and all numbers. - Reinhard Zumkeller, Sep 26 2001
a(n) and n have the same number of distinct primes with (A001222) and without multiplicity (A001221). - Michel Marcus, Jun 13 2014
From Antti Karttunen, Nov 01 2019: (Start)
More generally, a(n) has the same prime signature as n, A046523(a(n)) = A046523(n). Also A246277(a(n)) = A246277(n) and A287170(a(n)) = A287170(n).
Many permutations and other sequences that employ prime factorization of n to encode either polynomials, partitions (via Heinz numbers) or multisets in general can be easily defined by using this sequence as one of their constituent functions. See the last line in the Crossrefs section for examples.
(End)

Examples

			a(12) = a(2^2 * 3) = a(prime(1)^2 * prime(2)) = prime(2)^2 * prime(3) = 3^2 * 5 = 45.
a(A002110(n)) = A002110(n + 1) / 2.
		

References

  • Richard K. Guy, editor, Problems From Western Number Theory Conferences, Labor Day, 1983, Problem 367 (Proposed by Leroy F. Meyers, The Ohio State U.).

Crossrefs

See A045965 for another version.
Row 1 of table A242378 (which gives the "k-th powers" of this sequence), row 3 of A297845 and of A306697. See also arrays A066117, A246278, A255483, A308503, A329050.
Cf. A064989 (a left inverse), A064216, A000040, A002110, A000265, A027746, A046523, A048673 (= (a(n)+1)/2), A108228 (= (a(n)-1)/2), A191002 (= a(n)*n), A252748 (= a(n)-2n), A286385 (= a(n)-sigma(n)), A283980 (= a(n)*A006519(n)), A341529 (= a(n)*sigma(n)), A326042, A049084, A001221, A001222, A122111, A225546, A260443, A245606, A244319, A246269 (= A065338(a(n))), A322361 (= gcd(n, a(n))), A305293.
Cf. A249734, A249735 (bisections).
Cf. A246261 (a(n) is of the form 4k+1), A246263 (of the form 4k+3), A246271, A246272, A246259, A246281 (n such that a(n) < 2n), A246282 (n such that a(n) > 2n), A252742.
Cf. A275717 (a(n) > a(n-1)), A275718 (a(n) < a(n-1)).
Cf. A003972 (Möbius transform), A003973 (Inverse Möbius transform), A318321.
Cf. A300841, A305421, A322991, A250469, A269379 for analogous shift-operators in other factorization and quasi-factorization systems.
Cf. also following permutations and other sequences that can be defined with the help of this sequence: A005940, A163511, A122111, A260443, A206296, A265408, A265750, A275733, A275735, A297845, A091202 & A091203, A250245 & A250246, A302023 & A302024, A302025 & A302026.
A version for partition numbers is A003964, strict A357853.
A permutation of A005408.
Applying the same transformation again gives A357852.
Other multiplicative sequences: A064988, A357977, A357978, A357980, A357983.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Haskell
    a003961 1 = 1
    a003961 n = product $ map (a000040 . (+ 1) . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012, Oct 09 2011
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A003961 n) (apply * (map A000040 (map 1+ (map A049084 (factor n))))))
    ;; Antti Karttunen, May 20 2014
    
  • Maple
    a:= n-> mul(nextprime(i[1])^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017
  • Mathematica
    a[p_?PrimeQ] := a[p] = Prime[ PrimePi[p] + 1]; a[1] = 1; a[n_] := a[n] = Times @@ (a[#1]^#2& @@@ FactorInteger[n]); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Dec 01 2011, updated Sep 20 2019 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[n == 1], {n, 65}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],nextprime(1+f[k,1])^f[k,2]))
    
  • PARI
    a(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Michel Marcus, May 17 2014
    
  • Perl
    use ntheory ":all";  sub a003961 { vecprod(map { next_prime($) } factor(shift)); }  # _Dana Jacobsen, Mar 06 2016
    
  • Python
    from sympy import factorint, prime, primepi, prod
    def a(n):
        f=factorint(n)
        return 1 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f)
    [a(n) for n in range(1, 11)] # Indranil Ghosh, May 13 2017

Formula

If n = Product p(k)^e(k) then a(n) = Product p(k+1)^e(k).
Multiplicative with a(p^e) = A000040(A000720(p)+1)^e. - David W. Wilson, Aug 01 2001
a(n) = Product_{k=1..A001221(n)} A000040(A049084(A027748(n,k))+1)^A124010(n,k). - Reinhard Zumkeller, Oct 09 2011 [Corrected by Peter Munn, Nov 11 2019]
A064989(a(n)) = n and a(A064989(n)) = A000265(n). - Antti Karttunen, May 20 2014 & Nov 01 2019
A001221(a(n)) = A001221(n) and A001222(a(n)) = A001222(n). - Michel Marcus, Jun 13 2014
From Peter Munn, Oct 31 2019: (Start)
a(n) = A225546((A225546(n))^2).
a(A225546(n)) = A225546(n^2).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 2.06399637... . - Amiram Eldar, Nov 18 2022

A255127 Ludic array: square array A(row,col), where row n lists the numbers removed at stage n in the sieve which produces Ludic numbers. Array is read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

2, 4, 3, 6, 9, 5, 8, 15, 19, 7, 10, 21, 35, 31, 11, 12, 27, 49, 59, 55, 13, 14, 33, 65, 85, 103, 73, 17, 16, 39, 79, 113, 151, 133, 101, 23, 18, 45, 95, 137, 203, 197, 187, 145, 25, 20, 51, 109, 163, 251, 263, 281, 271, 167, 29, 22, 57, 125, 191, 299, 325, 367, 403, 311, 205, 37, 24, 63, 139, 217, 343, 385, 461, 523, 457, 371, 253, 41
Offset: 2

Views

Author

Antti Karttunen, Feb 22 2015

Keywords

Comments

The starting offset of the sequence giving the terms of square array is 2. However, we can tacitly assume that a(1) = 1 when the sequence is used as a permutation of natural numbers. However, term 1 itself is out of the array.
The choice of offset = 2 for the terms starting in rows >= 1 is motivated by the desire to have a permutation of the integers n -> a(n) with a(n) = A(A002260(n-1), A004736(n-1)) for n > 1 and a(1) := 1. However, since this sequence is declared as a "table", offset = 2 would mean that the first *row* (not element) has index 2. I think the sequence should have offset = 1 and the permutation of the integers would be n -> a(n-1) with a(0) := 1 (if a(1) = A(1,1) = 2). Or, the sequence could have offset 0, with an additional row 0 of length 1 with the only element a(0) = A(0,1) = 1, the permutation still being n -> a(n-1) if a(n=0, 1, 2, ...) = (1, 2, 4, ...). This would be in line with considering 1 as the first ludic number, and A(n, 1) = A003309(n+1) for n >= 0. - M. F. Hasler, Nov 12 2024

Examples

			The top left corner of the array:
   2,   4,   6,   8,  10,  12,   14,   16,   18,   20,   22,   24,   26
   3,   9,  15,  21,  27,  33,   39,   45,   51,   57,   63,   69,   75
   5,  19,  35,  49,  65,  79,   95,  109,  125,  139,  155,  169,  185
   7,  31,  59,  85, 113, 137,  163,  191,  217,  241,  269,  295,  323
  11,  55, 103, 151, 203, 251,  299,  343,  391,  443,  491,  539,  587
  13,  73, 133, 197, 263, 325,  385,  449,  511,  571,  641,  701,  761
  17, 101, 187, 281, 367, 461,  547,  629,  721,  809,  901,  989, 1079
  23, 145, 271, 403, 523, 655,  781,  911, 1037, 1157, 1289, 1417, 1543
  25, 167, 311, 457, 599, 745,  883, 1033, 1181, 1321, 1469, 1615, 1753
  29, 205, 371, 551, 719, 895, 1073, 1243, 1421, 1591, 1771, 1945, 2117
...
		

Crossrefs

Transpose: A255129.
Inverse: A255128. (When considered as a permutation of natural numbers with a(1) = 1).
Cf. A260738 (index of the row where n occurs), A260739 (of the column).
Main diagonal: A255410.
Column 1: A003309 (without the initial 1). Column 2: A254100.
Row 1: A005843, Row 2: A016945, Row 3: A255413, Row 4: A255414, Row 5: A255415, Row 6: A255416, Row 7: A255417, Row 8: A255418, Row 9: A255419.
A192607 gives all the numbers right of the leftmost column, and A192506 gives the composites among them.
Cf. A272565, A271419, A271420 and permutations A269379, A269380, A269384.
Cf. also related or derived arrays A260717, A257257, A257258 (first differences of rows), A276610 (of columns), A276580.
Analogous arrays for other sieves: A083221, A255551, A255543.
Cf. A376237 (ludic factorials), A377469 (ludic analog of A005867).

Programs

  • Mathematica
    rows = 12; cols = 12; t = Range[2, 3000]; r = {1}; n = 1; While[n <= rows, k = First[t]; AppendTo[r, k]; t0 = t; t = Drop[t, {1, -1, k}]; ro[n++] = Complement[t0, t][[1 ;; cols]]]; A = Array[ro, rows]; Table[ A[[n - k + 1, k]], {n, 1, rows}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 14 2016, after Ray Chandler *)
  • Python
    a255127 = lambda n: A255127(A002260(k-1), A004736(k-1))
    def A255127(n, k):
        A = A255127; R = A.rows
        while len(R) <= n or len(R[n]) < min(k, A.P[n]): A255127_extend(2*n)
        return R[n][(k-1) % A.P[n]] + (k-1)//A.P[n] * A.S[n]
    A=A255127; A.rows=[[1],[2],[3]]; A.P=[1]*3; A.S=[0,2,6]; A.limit=30
    def A255127_extend(rMax=9, A=A255127):
        A.limit *= 2; L = [x+5-x%2 for x in range(0, A.limit, 3)]
        for r in range(3, rMax):
            if len(A.P) == r:
                A.P += [ A.P[-1] * (A.rows[-1][0] - 1) ]  # A377469
                A.rows += [[]]; A.S += [ A.S[-1] * L[0] ] # ludic factorials
            if len(R := A.rows[r]) < A.P[r]: # append more terms to this row
                R += L[ L[0]*len(R) : A.S[r] : L[0] ]
            L = [x for i, x in enumerate(L) if i%L[0]] # M. F. Hasler, Nov 17 2024
  • Scheme
    (define (A255127 n) (if (<= n 1) n (A255127bi (A002260 (- n 1)) (A004736 (- n 1)))))
    (define (A255127bi row col) ((rowfun_n_for_A255127 row) col))
    ;; definec-macro memoizes its results:
    (definec (rowfun_n_for_A255127 n) (if (= 1 n) (lambda (n) (+ n n)) (let* ((rowfun_for_remaining (rowfun_n_for_remaining_numbers (- n 1))) (eka (rowfun_for_remaining 0))) (COMPOSE rowfun_for_remaining (lambda (n) (* eka (- n 1)))))))
    (definec (rowfun_n_for_remaining_numbers n) (if (= 1 n) (lambda (n) (+ n n 3)) (let* ((rowfun_for_prevrow (rowfun_n_for_remaining_numbers (- n 1))) (off (rowfun_for_prevrow 0))) (COMPOSE rowfun_for_prevrow (lambda (n) (+ 1 n (floor->exact (/ n (- off 1)))))))))
    

Formula

From M. F. Hasler, Nov 12 2024: (Start)
A(r, c) = A(r, c-P(r)) + S(r) = A(r, ((c-1) mod P(r)) + 1) + floor((c-1)/P(r))*S(r) with periods P = (1, 1, 2, 8, 48, 480, 5760, ...) = A377469, and shifts S = (2, 6, 30, 210, 2310, 30030, 510510) = A376237(2, 3, ...). For example:
A(1, c) = A(1, c-1) + 2 = 2 + (c-1)*2 = 2*c,
A(2, c) = A(2, c-1) + 6 = 3 + (c-1)*6 = 6*c - 3,
A(3, c) = A(3, c-2) + 30 = {5 if c is odd else 19} + floor((c-1)/2)*30 = 15*c - 11 + (c mod 2),
A(4, c) = A(4, c-8) + 210 = A(4, ((c-1) mod 8)+1) + floor((c-1)/8)*210, etc. (End)
Showing 1-10 of 17 results. Next