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.

A353597 Rounded values of Celsius (Centigrade) temperatures for which the corresponding Fahrenheit temperature rounds to its digit reversal.

This page as a plain text file.
%I A353597 #21 Nov 13 2024 16:41:59
%S A353597 16,28,2684,2805,4157,53669,5368563143669,5338951823110169,
%T A353597 5338981436856610169,26768895182311048184,28231104817688951805,
%U A353597 41768895182311048157,536856314368563143669,26768898143685661048184,28231101856314338951805,41768898143685661048157,536856610481768898143669
%N A353597 Rounded values of Celsius (Centigrade) temperatures for which the corresponding Fahrenheit temperature rounds to its digit reversal.
%C A353597 Neither temperature reading is required to be an integer.  In fact, 2684 C = 4863.2 F which would not round to 4862, and 4862 F = 2863.33+ C which would not round to 2864.
%C A353597 Rounding is a necessary part of the definition; there are no solutions in exact integers.
%C A353597 The rounding behavior at half-integers will never be relevant as long as it's consistent (round down, round up, or round-to-even).  The only case where half-integers could produce an additional solution is when one of them would need to be rounded up and the other rounded down, but to integers of opposite parity, as in 2075372.5 C = 3735702.5 F.
%C A353597 The sequence is infinite: it includes families such as c = (53691*10^(8*k+4)-166331)/10001 = 53[68563143]669, f = (966438*10^(8*k+3)+8635)/10001 = 966[34136586]35, where the bracketed block of digits occurs k times, for k >= 0.
%H A353597 Karl W. Heuer, <a href="/A353597/b353597.txt">Table of n, a(n) for n = 1..1099</a>
%H A353597 Car Talk, <a href="https://www.cartalk.com/radio/puzzler/temperature-flip-0">The Temperature Flip</a>
%e A353597 2684 is in the list because 2683.6 C = 4862.48 F and (2684, 4862) are reversals.
%o A353597 (Python)
%o A353597 def rv(x, k):
%o A353597   y = 0
%o A353597   for i in range(k): x, y = x//10, y*10+x%10
%o A353597   return y
%o A353597 def fc(maxlen):
%o A353597   z, pp = 1, [[0]]*13
%o A353597   for k in range(1, (maxlen+3)//2):
%o A353597     z, od, ev = z*10, [], []
%o A353597     for h in range(13):
%o A353597       qq = []
%o A353597       for p in pp[h]:
%o A353597         for d in range(10):
%o A353597           if k == 1 and d == 0: continue
%o A353597           f0 = p + d*(z//10)
%o A353597           c0 = (154+h-5*f0)*(z//9)%z
%o A353597           c1, f1 = rv(f0, k), rv(c0, k)
%o A353597           if c1%10 == f1%10:
%o A353597             c, f = c1//10*z+c0, f1//10*z+f0
%o A353597             if 9*c+154+h == 5*f: od.append(c)
%o A353597           c, f = c1*z+c0, f1*z+f0
%o A353597           if 9*c+154+h == 5*f: ev.append(c)
%o A353597           if k < 3 or (9*(c1+2) >= 5*f1 and 5*(f1+1) >= 9*c1): qq.append(f0)
%o A353597       pp[h] = qq
%o A353597     for c in sorted(od): print(c)
%o A353597     for c in sorted(ev): print(c)
%Y A353597 Cf. A353598.
%K A353597 base,nonn
%O A353597 1,1
%A A353597 _Karl W. Heuer_, Apr 29 2022