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.

A267939 Number x = concat(MSD(x),b), where MSD = A000030 stands for Most Significant Digit, such that MSD(x)*b is equal to the reverse of x.

Original entry on oeis.org

351, 621, 886, 920781, 3524751, 338752611, 35247524751, 920780120781, 920879219781, 3387524752611, 3526124738751, 338738752612611, 352475247524751, 33875247524752611, 35247387526124751, 35261247524738751, 920780120780120781, 920780219879120781, 920879120780219781, 920879219879219781
Offset: 1

Views

Author

Paolo P. Lava, Jan 22 2016

Keywords

Comments

If we consider numbers x = concat(a,b), where a has two digits, such that a*b is equal to the reverse of x, the first terms are 425322, 44235301, 119910901, ...
Terms of the form 3(5247)*51, i.e. 351, 3524751, 35247524751, ..., form an infinite subsequence. - Robert Israel, Jan 28 2016
Other infinite sequences of terms include 92078(012078)*1 and 33875(2475)*2611. - Robert Israel, Jan 31 2016

Examples

			3*51 = 153;
6*21 = 126;
3*524751 = 1574253.
		

Crossrefs

Programs

  • Maple
    T:=proc(w) local x, y, z; x:=w; y:=0;
    for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10); od; y; end:
    P:=proc(q) local a,b,n; for n from 1 to q do a:=n mod 10; b:=trunc(n/10^ilog10(n));
    if (a=1 and b>1) or (a=6 and (b=2 or b=4 or b=6 or b=8)) or (b=5 and (a=3 or a=5 or a=7 or a=9)) then
    if T(n)=b*(n mod 10^ilog10(n)) then print(n); fi; fi; od; end: P(10^10);
    # alternative:
    N:= 20: # to get all terms with at most N digits.
    extend:= proc(d,psol,eqs)
      local peqs, cvars, bvars, ncs, res,T, cs, ceqs, sol, svals;
      peqs:= subs(psol, eqs);
      cvars,bvars:= selectremove(t -> op(0,t) = 'c',indets(peqs));
      ncs:= nops(cvars);
      res:= NULL;
      if ncs >= 1 then
        T:= combinat:-cartprod([[$0..d-1]$ncs]);
        while not T[finished] do
          cs:= T[nextvalue]();
          cs:= seq(cvars[i]=cs[i],i=1..ncs);
          ceqs:= subs(cs,peqs);
          sol:= solve(ceqs,bvars); svals:= map(rhs,sol);
          if indets(svals) <> {} then error("Oops: %1",svals) fi;
          if svals::set(nonnegint) and max(svals) <= 9 then
            res:= res, [op(psol), cs, op(sol)];
          fi
        od
      else
        sol:= solve(peqs,bvars);
        svals:= map(rhs,sol);
        if indets(svals) <> {} then error("Oops: %1",svals) fi;
        if svals::set(nonnegint) and max(svals) <= 9 then
            res:= [op(psol), op(sol)];
        fi
      fi;
      [res]
    end proc:
    G:= proc(d,n)
         local eqs, i, rs, b0s;
         eqs:= [d*b[0] - d - 10*c[0],
                seq(d*b[i]+c[i-1] - b[n-i] - 10*c[i], i=1..n-2),
                d*b[n-1] + c[n-2] - b[1] - 10*b[0]];
         b0s:= [msolve(eqs[1] mod 10,10)];
         rs:= select(t -> (map(rhs,t))::set(nonnegint),
             map(t -> t union solve(eval(eqs[1],t),{c[0]}),b0s));
         for i from 1 to floor(n/2) do
            rs:= map(s -> op(extend(d,s,{eqs[i+1],eqs[-i]})), rs);
         od;
         sort(map(s -> d*10^n + subs(s, add(10^i*b[i],i=0..n-1)), rs));
    end proc:
    A:= NULL;
    for n from 2 to N-1 do
      for d from 3 to 9 do
        res:= G(d,n);
        if res <> [] then
          A:= A, op(res);
        fi
      od
    od:
    A; # Robert Israel, Feb 01 2016
  • Mathematica
    Select[Range@ 4000000, First[#] FromDigits@ Rest@ # == FromDigits@ Reverse@ # &@ IntegerDigits@ # &] (* Michael De Vlieger, Jan 29 2016 *)

Extensions

a(7) to a(20) from Robert Israel, Feb 01 2016