login

Revision History for A340008

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the image of n under the map: n -> n/2 if n is even, n-> n^2 - 1 if n is an odd prime, otherwise n -> n - 1.
(history; published version)
#15 by N. J. A. Sloane at Tue Jan 05 21:44:51 EST 2021
STATUS

proposed

approved

#14 by Michael De Vlieger at Mon Dec 28 14:48:10 EST 2020
STATUS

editing

proposed

#13 by Michael De Vlieger at Mon Dec 28 14:48:07 EST 2020
MATHEMATICA

Array[Which[EvenQ@ #, #/2, PrimeQ@ #, #^2 - 1, True, # - 1] &, 64] (* Michael De Vlieger, Dec 28 2020 *)

STATUS

reviewed

editing

#12 by Michel Marcus at Sun Dec 27 03:42:18 EST 2020
STATUS

proposed

reviewed

#11 by Joerg Arndt at Sun Dec 27 01:42:09 EST 2020
STATUS

editing

proposed

#10 by Joerg Arndt at Sun Dec 27 01:42:05 EST 2020
COMMENTS

The This map is used in A339991.

STATUS

proposed

editing

#9 by Ya-Ping Lu at Sat Dec 26 21:19:30 EST 2020
STATUS

editing

proposed

#8 by Ya-Ping Lu at Sat Dec 26 21:12:13 EST 2020
NAME

a(n) is the image of n > 1 under the map: n -> n/2 if n is even, n-> n^2 - 1 if n is an odd prime, otherwise n -> n - 1.

DATA

0, 1, 8, 2, 24, 3, 48, 4, 8, 5, 120, 6, 168, 7, 14, 8, 288, 9, 360, 10, 20, 11, 528, 12, 24, 13, 26, 14, 840, 15, 960, 16, 32, 17, 34, 18, 1368, 19, 38, 20, 1680, 21, 1848, 22, 44, 23, 2208, 24, 48, 25, 50, 26, 2808, 27, 54, 28, 56, 29, 3480, 30, 3720, 31, 62, 32

OFFSET

2,2

1,3

PROG

for n in range(2, 1, 1001):

STATUS

proposed

editing

Discussion
Sat Dec 26
21:19
Ya-Ping Lu: Added a(1) = 0 in data and made the change in Python program accordingly.
#7 by Michel Marcus at Sat Dec 26 09:41:50 EST 2020
STATUS

editing

proposed

#6 by Michel Marcus at Sat Dec 26 09:41:39 EST 2020
PROG

(PARI) a(n) = if (n%2, if (isprime(n), n^2-1, n-1), n/2); \\ Michel Marcus, Dec 26 2020

STATUS

proposed

editing

Discussion
Sat Dec 26
09:41
Michel Marcus: I would insert a(1) = 0