login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A296088
Filter combining sigma(n) with the parity of n; restricted growth sequence transform of ((-1)^n)*A000203(n).
2
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 15, 23, 24, 20, 25, 26, 27, 28, 21, 29, 30, 31, 30, 32, 33, 23, 34, 35, 36, 37, 38, 39, 40, 28, 30, 41, 42, 43, 44, 45, 46, 47, 44, 47, 48, 35, 49, 50, 51, 37, 52, 53, 54, 55, 56, 57, 58, 55, 44, 59, 60, 61, 62, 63, 58, 50, 48, 64, 65, 57, 54, 66, 67, 68, 69, 70, 71, 72, 73, 50, 74, 55, 69
OFFSET
1,2
LINKS
EXAMPLE
For n = 21 and 31 the restricted growth sequence transform assigns the same value (we have a(21) = a(31) = 21) because both numbers are odd, and the sum of their divisors is equal as sigma(21) = sigma(31) = 32.
On the other hand, although sigma(14) = sigma(15) = 24, a(14) != a(15) because the other number is even and the other number is odd. Compare to A286603.
PROG
(PARI)
up_to = 65537;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
write_to_bfile(1, rgs_transform(vector(up_to, n, ((-1)^n)*sigma(n))), "b296088.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 07 2017
STATUS
approved