|
|
A338227
|
|
a(n) = x(n) mod floor(sqrt(x(n))), where x(n) = floor((n^2)/2).
|
|
1
|
|
|
0, 0, 0, 0, 2, 0, 2, 4, 1, 4, 0, 3, 8, 2, 7, 0, 6, 11, 4, 10, 2, 8, 0, 6, 14, 3, 12, 0, 9, 18, 6, 15, 2, 12, 23, 8, 20, 4, 16, 0, 12, 24, 7, 20, 2, 15, 30, 10, 25, 4, 20, 35, 14, 30, 8, 24, 1, 18, 36, 11, 30, 4, 23, 42, 16, 35, 8, 28, 0, 20, 42, 12, 34, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
x( 7) = floor(( 7^2)/2) = 24, a( 7) = 24 mod floor(sqrt(24)) = 24 mod 4 = 0,
x( 8) = floor(( 8^2)/2) = 32, a( 8) = 32 mod floor(sqrt(32)) = 32 mod 5 = 2,
x( 9) = floor(( 9^2)/2) = 40, a( 9) = 40 mod floor(sqrt(40)) = 40 mod 6 = 4,
x(10) = floor((10^2)/2) = 50, a(10) = 50 mod floor(sqrt(50)) = 50 mod 7 = 1.
|
|
MATHEMATICA
|
|
|
PROG
|
(Ruby) values = Array.new(50) do |i|
x = ((i + 2) ** 2) / 2
x % Integer.sqrt(x)
end
p values
(PARI) a(n) = my(x=n^2\2); x % sqrtint(x); \\ Michel Marcus, Jan 31 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|