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.

A369154 Numbers k such that A125611(k) = A125611(k + 1).

This page as a plain text file.
%I A369154 #18 Jul 13 2024 17:30:58
%S A369154 2,9,15,28,40,41,42,48,60,68,79,83,93,95,98,100,108,114,118,120,124,
%T A369154 129,132,137,147,149,167,196,202,206,207,215,219,221,223,225,230,243,
%U A369154 248,255,261,265,274,276,287,299,302,320,323,329,337,341,353,356,360,364,365,373,380,381,391,405,410
%N A369154 Numbers k such that A125611(k) = A125611(k + 1).
%C A369154 Numbers k such that A125611(k)^6 - 1 is divisible by 7^(k+1).
%C A369154 Since the 3 consecutive numbers 40, 41 and 42 are in the sequence, A125611(40) = A125611(41) = A125611(42) = A125611(43).
%H A369154 Robert Israel, <a href="/A369154/b369154.txt">Table of n, a(n) for n = 1..430</a>
%e A369154 a(3) = 15 is a term because A125611(15) = A125611(16) = 56020344873707, i.e., 56020344873707 is the least prime p such that p^6 - 1 is divisible by 7^15, and in this case p^6 - 1 is also divisible by 7^16.
%p A369154 f:= proc(n) local R,r,i;
%p A369154   R:= sort(map(rhs@op, [msolve(x^6=1, 7^n)]));
%p A369154   for i from 0 do
%p A369154     for r in R do
%p A369154       if isprime(7^n * i + r) then return 7^n * i + r fi
%p A369154   od od;
%p A369154 end proc:
%p A369154 R:= NULL: count:= 0:
%p A369154 for k from 1 while count < 100 do
%p A369154  v:= f(k);
%p A369154  if v = w then R:= R, k-1; count:= count+1 fi;
%p A369154  w:= v;
%p A369154 od:
%p A369154 R;
%o A369154 (Python)
%o A369154 from itertools import count, islice
%o A369154 from sympy import nthroot_mod, isprime
%o A369154 def A369154_gen(): # generator of terms
%o A369154     c, m = 1, 1
%o A369154     for k in count(0):
%o A369154         m *= 7
%o A369154         r = sorted(nthroot_mod(1,6,m,all_roots=True))
%o A369154         for i in count(0,m):
%o A369154             for p in r:
%o A369154                 if isprime(i+p):
%o A369154                     if i+p == c:
%o A369154                         yield k
%o A369154                     c = i+p
%o A369154                     break
%o A369154             else:
%o A369154                 continue
%o A369154             break
%o A369154 A369154_list = list(islice(A369154_gen(),30)) # _Chai Wah Wu_, May 04 2024
%Y A369154 Cf. A125611.
%K A369154 nonn
%O A369154 1,1
%A A369154 _Robert Israel_, Jan 14 2024