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.

A274765 Cyclops numbers with circular digits {0,6,8,9}.

This page as a plain text file.
%I A274765 #22 Sep 24 2024 03:14:27
%S A274765 0,606,608,609,806,808,809,906,908,909,66066,66068,66069,66086,66088,
%T A274765 66089,66096,66098,66099,68066,68068,68069,68086,68088,68089,68096,
%U A274765 68098,68099,69066,69068,69069,69086,69088,69089,69096,69098,69099,86066,86068,86069,86086,86088,86089,86096,86098,86099
%N A274765 Cyclops numbers with circular digits {0,6,8,9}.
%C A274765 Intersection of A001743 and A134808.
%H A274765 Kenny Lau, <a href="/A274765/b274765.txt">Table of n, a(n) for n = 1..20000</a>
%e A274765 86069 is a member because it is cyclops (A134808) and each digit contains at least one loop (A001743).
%t A274765 cncdQ[n_]:=Module[{idn=IntegerDigits[n]},OddQ[Length[idn]]&&Count[idn,0] == 1&&idn[[(Length[idn]+1)/2]]==0&&SubsetQ[{0,6,8,9},idn]]; Select[ Range[ 0,90000],cncdQ] (* _Harvey P. Dale_, Jan 06 2022 *)
%o A274765 (Python)
%o A274765 import sys
%o A274765 f = open('b274765.txt', 'w')
%o A274765 i = 1
%o A274765 n = 0
%o A274765 a = [""]
%o A274765 while True:
%o A274765     for x in a:
%o A274765         for y in a:
%o A274765             f.write(str(i)+" "+x+"0"+y+"\n")
%o A274765             i += 1
%o A274765             if i>20000:
%o A274765                 f.close()
%o A274765                 sys.exit()
%o A274765     a = sum([[x+"6", x+"8", x+"9"] for x in a], [])
%o A274765 # _Kenny Lau_, Jul 05 2016
%o A274765 (PARI) is_a001633(n) = #Str(n)%2==1
%o A274765 is_a001743(n) = #setintersect([1, 2, 3, 4, 5, 7], Set(digits(n)))==0
%o A274765 is_a134808(n) = if(n==0, return(1), if(n < 10, return(0), my(d=digits(n), x=1, y=#d); while(x < #d, if(d[x]==0, break); x++); while(y > 1, if(d[y]==0, break); y--); if(x==y && x==ceil(#Str(n)/2), return(1), return(0))))
%o A274765 is(n) = is_a001633(n) && is_a001743(n) && is_a134808(n) \\ _Felix Fröhlich_, Jul 05 2016
%Y A274765 Cf. A001633, A001742, A134808, A160561.
%K A274765 nonn,base,easy
%O A274765 1,2
%A A274765 _Kenny Lau_, Jul 05 2016