

A271531


a(1) = 1; thereafter a(n) is the LCM of all 0 < m < n for which n == a(m) (mod m).


3



1, 1, 2, 1, 12, 1, 30, 3, 28, 9, 24, 5, 132, 3, 26, 7, 420, 1, 360, 3, 4, 5, 1680, 253, 84, 15, 440, 117, 1020, 7, 42, 15, 28, 725, 2376, 1, 47880, 3, 2960, 1, 29640, 155, 120, 21, 476, 11781, 11040, 1, 2640, 3, 1288, 5, 300, 13, 144, 285, 2860, 7, 4200, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


LINKS

Peter Kagey, Table of n, a(n) for n = 1..10000


EXAMPLE

a(1) = 1 by definition.
a(2) = 1, because 2 == a(1) (mod 1);
a(3) = 2, because 3 == a(1) (mod 1), and 3 == a(2) (mod 2): lcm(1, 2) = 2;
a(4) = 1, because 4 == a(1) (mod 1);
a(5) = 12, because 5 == k (mod k) for 0 < k < 5: lcm(1, 2, 3, 4) = 12.


PROG

(PARI) lista(nn) = {va = vector(nn); va[1] = 1; print1(va[1], ", "); for (n=2, nn, new = 1; for (k=1, n1, if (Mod(va[k], k) == Mod(n, k), new = lcm(new, k); ); ); va[n] = new; print1(va[n], ", "); ); } \\ Michel Marcus, Mar 13 2018


CROSSREFS

Sequence in context: A105608 A051190 A072512 * A118588 A259633 A174500
Adjacent sequences: A271528 A271529 A271530 * A271532 A271533 A271534


KEYWORD

nonn


AUTHOR

Peter Kagey, Apr 09 2016


STATUS

approved



