login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338227 a(n) = x(n) mod floor(sqrt(x(n))), where x(n) = floor((n^2)/2). 1

%I #18 Mar 18 2021 08:22:59

%S 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,

%T 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,

%U 18,36,11,30,4,23,42,16,35,8,28,0,20,42,12,34,3

%N a(n) = x(n) mod floor(sqrt(x(n))), where x(n) = floor((n^2)/2).

%H Simon Strandgaard, <a href="/A338227/a338227.jpg">Plot of 10000 terms with primes highlighted</a>

%F a(n) = A007590(n) mod A000196(A007590(n)).

%F a(n) = A007590(n) mod A049472(n). - _Kevin Ryde_, Jan 30 2021

%e x( 7) = floor(( 7^2)/2) = 24, a( 7) = 24 mod floor(sqrt(24)) = 24 mod 4 = 0,

%e x( 8) = floor(( 8^2)/2) = 32, a( 8) = 32 mod floor(sqrt(32)) = 32 mod 5 = 2,

%e x( 9) = floor(( 9^2)/2) = 40, a( 9) = 40 mod floor(sqrt(40)) = 40 mod 6 = 4,

%e x(10) = floor((10^2)/2) = 50, a(10) = 50 mod floor(sqrt(50)) = 50 mod 7 = 1.

%t x[n_] := Floor[(n^2)/2]; A338227[n_] := Mod[x[n], Floor[Sqrt[x[n]]]]; Table[A338227[n], {n, 2, 75}] (* _Robert P. P. McKone_, Jan 31 2021 *)

%o (Ruby) values = Array.new(50) do |i|

%o x = ((i + 2) ** 2) / 2

%o x % Integer.sqrt(x)

%o end

%o p values

%o (PARI) a(n) = my(x=n^2\2); x % sqrtint(x); \\ _Michel Marcus_, Jan 31 2021

%Y Cf. A000196, A007590, A049472.

%K nonn

%O 2,5

%A _Simon Strandgaard_, Jan 30 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 19:07 EDT 2024. Contains 375144 sequences. (Running on oeis4.)