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.

A071240 Arithmetic mean of k and R(k) where k is a number using only odd digits and R(k) is its digit reversal (A004086).

This page as a plain text file.
%I A071240 #18 Jul 02 2025 16:02:01
%S A071240 1,3,5,7,9,11,22,33,44,55,22,33,44,55,66,33,44,55,66,77,44,55,66,77,
%T A071240 88,55,66,77,88,99,111,212,313,414,515,131,232,333,434,535,151,252,
%U A071240 353,454,555,171,272,373,474,575,191,292,393,494,595,212,313,414,515,616
%N A071240 Arithmetic mean of k and R(k) where k is a number using only odd digits and R(k) is its digit reversal (A004086).
%F A071240 {k + R(k)}/2 where k uses only odd digits 1, 3, 5, 7 and 9.
%F A071240 a(n) = (A014261(n) + A004086(A014261(n))) / 2. - _Sean A. Irvine_, Jul 06 2024
%p A071240 reversal := proc(n) local i, len, new, temp:
%p A071240     new := 0: temp := n: len := floor(log[10](n+.1))+1:
%p A071240     for i from 1 to len do
%p A071240         new := new+irem(temp, 10)*10^(len-i):
%p A071240         temp := floor(temp/10):
%p A071240     od:
%p A071240     RETURN(new):
%p A071240 end:
%p A071240 allodd := proc(n) local i, flag, len, temp:
%p A071240     temp := n: flag := 1: if n=0 then flag := 0 fi: len := floor(log[10](n+.1))+1:
%p A071240     for i from 1 to len do
%p A071240         if irem(temp, 10) mod 2 = 1 then temp := floor(temp/10) else flag := 0 fi:
%p A071240     od:
%p A071240     RETURN(flag):
%p A071240 end:
%p A071240 for n from 1 to 501 by 2 do
%p A071240     if allodd(n) = 1 then printf(`%d, `, (n+reversal(n))/2) fi:
%p A071240 od: # _James Sellers_, May 28 2002
%Y A071240 Cf. A004086, A014261, A071241, A071242.
%K A071240 base,nonn
%O A071240 0,2
%A A071240 _Amarnath Murthy_, May 20 2002
%E A071240 More terms from _James Sellers_, May 28 2002