The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A119972 a(n) = n * A034947(n). 4
1, 2, -3, 4, 5, -6, -7, 8, 9, 10, -11, -12, 13, -14, -15, 16, 17, 18, -19, 20, 21, -22, -23, -24, 25, 26, -27, -28, 29, -30, -31, 32, 33, 34, -35, 36, 37, -38, -39, 40, 41, 42, -43, -44, 45, -46, -47, -48, 49, 50, -51, 52, 53, -54, -55, -56, 57, 58, -59, -60, 61, -62, -63, 64, 65, 66, -67, 68, 69, -70, -71, 72, 73, 74, -75 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Previous name was: Flag n when the first difference of the decimal encoding of the Gray code is negative. (With "flag" meaning negate n when the difference is negative.)
Merge A091072 with minus A091067 maintaining increasing absolute value.
LINKS
FORMULA
a(n) = n*Kronecker(-1, n) = n * A034947(n). - Andrew Howroyd, Aug 06 2018
EXAMPLE
A003188 begins 0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 ... so
A055975 begins 1 2 -1 4 1 -2 -1 8 1 2 -1 -4 1 -2 ...
Sequence 1, 2,-3, 4, 5,-6,-7, 8, 9, 10,-11,-12, 13,-14, ...
Negative terms are at positions 3,6,7,11,12,14,..., = A091067.
Positive terms are the complement, which is A091072.
MAPLE
isA091067 := proc(n) option remember ; if n mod 4 = 3 then RETURN(true) ; else if n mod 2 = 0 then if isA091067(n/2) then RETURN(true) ; fi ; fi ; RETURN(false) ; fi ; end: A119972 := proc(n) if isA091067(n) then -n ; else n ; fi ; end: for n from 1 to 180 do printf("%d, ", A119972(n)) ; od ; # R. J. Mathar, May 14 2007
# second Maple program:
a:= n-> numtheory[jacobi](-1, n)*n:
seq(a(n), n=1..75); # Alois P. Heinz, Jan 19 2023
MATHEMATICA
a[n_] := n KroneckerSymbol[-1, n];
Array[a, 75] (* Jean-François Alcover, Apr 09 2020 *)
PROG
(PARI) a(n) = n*kronecker(-1, n); \\ Andrew Howroyd, Aug 06 2018
CROSSREFS
Sequence in context: A099570 A114142 A020725 * A131738 A199969 A303502
KEYWORD
easy,sign,mult
AUTHOR
Alford Arnold, Jun 01 2006
EXTENSIONS
More terms from R. J. Mathar, May 14 2007
Keyword:mult added by Andrew Howroyd, Aug 06 2018
New name using existing formula from Joerg Arndt, Jan 19 2023
STATUS
approved

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 May 13 09:24 EDT 2024. Contains 372504 sequences. (Running on oeis4.)