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!)
A262725 The unique function f with f(1)=1 and f(jD!+k)=(-1)^j f(k) for all D, j=1..D, and k=1..D!. 0
1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
COMMENTS
sup_n |Sum_{j=1..n} f(jd)| is finite (but not bounded) for all d, thus giving a counterexample to a strong form of the Erdős discrepancy conjecture [see Remark 1.13 on p. 7 of Tao paper].
LINKS
Terence Tao, The Erdős discrepancy problem, arXiv:1509.05363 [math.CO], 2015-2017.
FORMULA
a(n) = (-1)^A034968(n-1). - Antti Karttunen and Peter Munn, Aug 09 2024
MATHEMATICA
(* Generates terms recursively, using definition *)
Module[{dmax = 4, i = 2, a}, a = Table[1, (dmax+1)!]; For[d = 1, d <= dmax, d++, For[j = 1, j <= d, j++, For[k = 1, k <= d!, k++, a[[i++]] = (-1)^j*a[[k]]]]]; a] (* Paolo Xausa, Aug 10 2024 *)
(* Generates terms individually, via A034968 (slower) *)
A034968[n_] := Module[{a = n, i = 2}, While[i! <= n, a-=(i-1)*Floor[n/i++!]]; a];
Array[(-1)^A034968[#] &, 5!, 0] (* Paolo Xausa, Aug 10 2024 *)
PROG
(Sage)
A=[1, 1]
for D in [1..4]:
j=1
while j<=D:
k=1
while k<=factorial(D):
A.append((-1)^j*A[k])
k+=1
j+=1
A[1:73] # Tom Edgar, Sep 29 2015
(PARI)
A034968(n) = { my(s=0, b=2, d); while(n, d = (n%b); s += d; n = (n-d)/b; b++); (s); };
A262725(n) = ((-1)^A034968(n-1)); \\ Antti Karttunen, Aug 09 2024
CROSSREFS
Cf. also A343785 (another example from Tao paper).
Sequence in context: A332433 A374385 A057077 * A070748 A154990 A209615
KEYWORD
easy,sign,changed
AUTHOR
Terence Tao, Sep 28 2015
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 August 14 09:10 EDT 2024. Contains 375159 sequences. (Running on oeis4.)