A353597 Rounded values of Celsius (Centigrade) temperatures for which the corresponding Fahrenheit temperature rounds to its digit reversal.
16, 28, 2684, 2805, 4157, 53669, 5368563143669, 5338951823110169, 5338981436856610169, 26768895182311048184, 28231104817688951805, 41768895182311048157, 536856314368563143669, 26768898143685661048184, 28231101856314338951805, 41768898143685661048157, 536856610481768898143669
Offset: 1
Examples
2684 is in the list because 2683.6 C = 4862.48 F and (2684, 4862) are reversals.
Links
- Karl W. Heuer, Table of n, a(n) for n = 1..1099
- Car Talk, The Temperature Flip
Crossrefs
Cf. A353598.
Programs
-
Python
def rv(x, k): y = 0 for i in range(k): x, y = x//10, y*10+x%10 return y def fc(maxlen): z, pp = 1, [[0]]*13 for k in range(1, (maxlen+3)//2): z, od, ev = z*10, [], [] for h in range(13): qq = [] for p in pp[h]: for d in range(10): if k == 1 and d == 0: continue f0 = p + d*(z//10) c0 = (154+h-5*f0)*(z//9)%z c1, f1 = rv(f0, k), rv(c0, k) if c1%10 == f1%10: c, f = c1//10*z+c0, f1//10*z+f0 if 9*c+154+h == 5*f: od.append(c) c, f = c1*z+c0, f1*z+f0 if 9*c+154+h == 5*f: ev.append(c) if k < 3 or (9*(c1+2) >= 5*f1 and 5*(f1+1) >= 9*c1): qq.append(f0) pp[h] = qq for c in sorted(od): print(c) for c in sorted(ev): print(c)
Comments