cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336019 a(n) is the smallest integer k (k>=2) such that 13...3 (1 followed by n 3's) mod k is even.

This page as a plain text file.
%I A336019 #22 Jan 17 2025 11:54:30
%S A336019 7,7,11,9,7,17,7,7,11,9,7,17,7,7,11,9,7,17,7,7,11,9,7,17,7,7,11,9,7,
%T A336019 17,7,7,11,9,7,23,7,7,11,9,7,17,7,7,11,9,7,23,7,7,11,9,7,17,7,7,11,9,
%U A336019 7,17,7,7,11,9,7,17,7,7,11,9,7,17,7,7,11,9,7,17,7,7
%N A336019 a(n) is the smallest integer k (k>=2) such that 13...3 (1 followed by n 3's) mod k is even.
%C A336019 More sequences can be generated by replacing the digit 1 by any integers of the form 3x+1. However, the sequence won't be as interesting if the following digits (the 3's) are replaced by any other digits.
%H A336019 Antti Karttunen, <a href="/A336019/b336019.txt">Table of n, a(n) for n = 1..20004</a>
%F A336019 I have proved the following properties:
%F A336019 For n=12x+1, a(n)=7.
%F A336019 For n=12x+2, a(n)=7.
%F A336019 For n=12x+3, a(n)=11.
%F A336019 For n=12x+4, a(n)=9.
%F A336019 For n=12x+5, a(n)=7.
%F A336019 For n=12x+6, a(n)=17.
%F A336019 For n=12x+7, a(n)=7.
%F A336019 For n=12x+8, a(n)=7.
%F A336019 For n=12x+9, a(n)=11.
%F A336019 For n=12x+10, a(n)=9.
%F A336019 For n=12x+11, a(n)=7.
%F A336019 For n=12x, a(n) can be 17, 19, 23 or 25.
%e A336019 a(5)=7 because
%e A336019 133333 mod 2 = 1
%e A336019 133333 mod 3 = 1
%e A336019 133333 mod 4 = 1
%e A336019 133333 mod 5 = 3
%e A336019 133333 mod 6 = 1
%e A336019 133333 mod 7 = 4, which is the first time the result is even.
%o A336019 (Python)
%o A336019 n=1
%o A336019 a=13
%o A336019 while n<=1000:
%o A336019     c=2
%o A336019     while True:
%o A336019         if (a%c)%2==1:
%o A336019             c=c+1
%o A336019         else:
%o A336019             print(c,end=", ")
%o A336019             break
%o A336019     n=n+1
%o A336019     a=10*a+3
%o A336019 (PARI) f(n) = (4*10^n-1)/3; \\ A097166
%o A336019 a(n) = my(k=2); while ((f(n) % k) % 2, k++); k; \\ _Michel Marcus_, Jul 05 2020
%Y A336019 Cf. A097166.
%K A336019 easy,nonn,base
%O A336019 1,1
%A A336019 _Yuan-Hao Huang_, Jul 05 2020