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!)
A333300 Numbers that are of the form abab in some base (a <> b, a <> 0). 1

%I #26 Oct 30 2021 13:42:08

%S 10,30,50,60,68,70,102,119,130,136,153,182,187,204,208,221,222,234,

%T 238,260,286,296,333,338,350,364,370,390,407,416,442,444,450,481,494,

%U 500,520,546,550,555,572,592,598,600,629,650,666,700,703,715,738,740,750

%N Numbers that are of the form abab in some base (a <> b, a <> 0).

%C The first terms with 2, 3, ..., 6 representations are 520, 4930, 117130, 111270100, and 3142012250. - _Giovanni Resta_, Mar 15 2020

%H Richárd Pintér, <a href="/A333300/b333300.txt">Table of n, a(n) for n = 1..10000</a>

%H Richárd Pintér, <a href="/A333300/a333300.hs.txt">Haskell source</a>

%e 10 = 1010_2 is a term, 30 = 1010_3 and 50 = 1212_3 also.

%t bxy[n_] := Block[{x,y,b,s, bb = Select[Sqrt[ Divisors[n] - 1], IntegerQ[#] && # > 1 && (1 + #^2) # <= n && #^4-#^2-2 >= n &]}, Flatten[ Table[s = Solve[(1 + b^2) (b x + y) == n && 0<x<b && 0<=y<b && x!=y, {x,y}, Integers]; If[s == {}, {}, {b,x,y} /. s], {b, bb}], 1]]; Select[ Range@ 750, bxy[#] != {} &] (* _Giovanni Resta_, Mar 14 2020 *)

%o (Python)

%o def ok(n):

%o base = 2

%o while True:

%o base3, base2 = base**3, base**2

%o if base3 + base > n: return False

%o for a in range(1, base):

%o for b in range(base):

%o if a == b: continue

%o t = a*(base3 + base) + b*(base2 + 1)

%o if t == n: return True

%o elif t > n: break

%o base += 1

%o print([k for k in range(751) if ok(k)]) # _Michael S. Branicky_, Oct 30 2021

%K nonn,base

%O 1,1

%A _Richárd Pintér_, Mar 14 2020

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 April 18 11:41 EDT 2024. Contains 371779 sequences. (Running on oeis4.)