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!)
A235726 Lexicographically earliest sequence of positive integers such that a(nm) != a(n + m) for all positive integers n and m such that nm != n + m. 1
1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) != a(n-1) because a(n*1) = a((n-1)+1).
Records appear at: a(1) = 1, a(2) = 2, a(8) = 3, a(16) = 4, a(64) = 5, a(1024) = 6, a(4080) = 7, a(320000) = 8.
From Robert Israel, Apr 19 2017: (Start)
a(n) = 1 iff n is odd.
If n == 2 (mod 4), then a(n) = 2.
(End)
LINKS
EXAMPLE
For n = 8,
a(8) != 1 because a(1 + 7) != a(1 * 7);
a(8) != 2 because a(2 * 4) != a(2 + 4);
a(8) = 3.
MAPLE
N:= 100: # to get a(1) to a(N)
A[1]:= 1: A[2]:= 2: A[3]:= 1: A[4]:= 2:
for n from 5 to N do
if n::odd then A[n]:= 1
else
A[n]:= min({$2..n} minus {seq(A[q+n/q], q=numtheory:-divisors(n) minus {1, n})});
fi
od:
seq(A[i], i=1..N); # Robert Israel, Apr 19 2017
PROG
(Haskell)
a 1 = 1
a 4 = 2
a n = head $ filter (`notElem` disallowedValues) [1..] where
disallowedValues = map a $ (n-1) : filter (<n) sums where
sums = map divisorSum divisors where
divisors = filter (\d -> n `mod` d == 0) [1..n]
divisorSum d = d + n `div` d
CROSSREFS
Cf. A072670.
Sequence in context: A356206 A318707 A363228 * A060938 A087942 A359237
KEYWORD
nonn
AUTHOR
Peter Kagey, Apr 18 2017
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 September 1 04:03 EDT 2024. Contains 375575 sequences. (Running on oeis4.)